-
Notifications
You must be signed in to change notification settings - Fork 0
/
artists
executable file
·43 lines (37 loc) · 1.02 KB
/
artists
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#get it together man:
#exec $0 ; pug index.pug ; serve
[[ "$1" = "stdout" || != "" ]] && exec > $2 || exec > ~/nodejs/pug/index.pug
#can redirect more than once > index2.jade
#save stdout and stderr to file descriptors 3 and 4, then redirect to index.jade
#exec 3>&1 4>&2 >index.jade 2>&1
#restore stdout and stderr
link=/home/liam/nodejs/pug/raw
mapfile -t link <$link
cat <<EOF
doctype 5
html(lang="en")
head
title= 'Index of Music, sorted by Artists'
meta(name='viewport', content='width=device-width')
link('type="text/css" rel="stylesheet" href="style.css"'
body
h1 Music, sorted by Artists
h2
| Use
a(href='www.koajs.com') for index.html
img(src='../../Music/KMD.jpg')
EOF
for i in "${link[@]}";do
#count items in array?
x=$(echo $i | cut -c 3-)
echo "span(style='text-align: right; padding-left: 1em;')
a(href='$i') $x"
done
cat << EOF
br
address
| NodeJS v.4.4.7
| serving music on 192.168.1.38 port 8000
EOF
# http://coffeekup.org/