on master help sign in
fix typo, make prints clearer
5538122Morgan Sutherland
scripts/build+8−8
@@ -15,7 +15,7 @@ ship=${2%/}
15
15
16copy_static_site ()
16copy_static_site ()
17{
17{
18− echo -e "Copying source files from $site to $ship"
18+ echo -e "- Copying source files from $site to $ship"
19 rm -rf $ship/home/web
19 rm -rf $ship/home/web
20 cp -r $site/static-site $ship/home/web
20 cp -r $site/static-site $ship/home/web
21 cp $site/static-site/index.hoon $ship/home/web.hoon
21 cp $site/static-site/index.hoon $ship/home/web.hoon
@@ -27,13 +27,13 @@ copy_static_site ()
27# Print instructions if both parameters aren't provided
27# Print instructions if both parameters aren't provided
28
28
29if [[ $# -lt 2 ]] ; then
29if [[ $# -lt 2 ]] ; then
30− printf 'This command needs two arguments:\n(1) the path to your urbit.org repository\n(2) the path to your pier\n'
30+ printf '- This command needs two arguments:\n(1) the path to your urbit.org repository\n(2) the path to your pier\n'
31 exit 0
31 exit 0
32fi
32fi
33
33
34# Print instructions
34# Print instructions
35
35
36−read -n1 -s -r -p $'Boot your fake ~zod and run |mount %, then press any key to continue\n'
36+read -n1 -s -r -p $'- Boot your fakezod and run |mount %, then press any key to continue\n'
37
37
38# Create dist folder
38# Create dist folder
39
39
@@ -44,22 +44,22 @@ mkdir $dist
44
44
45copy_static_site $site $ship
45copy_static_site $site $ship
46rm -rf $ship/home/web/docs
46rm -rf $ship/home/web/docs
47−read -n1 -s -r -p $'Wait for sync, then run |static in your urbit, wait for it to finish, then press any key to continue\n'
47+read -n1 -s -r -p $'- Wait for sync, then run |static in your urbit, wait for it to finish, then press any key to continue\n'
48
48
49# Copy results of first render (posts) to dist folder
49# Copy results of first render (posts) to dist folder
50
50
51−echo -e "Copying posts from $site to $ship"
51+echo -e "- Copying posts from $site to $ship"
52cp -r $ship/.urb/put/web/* $dist
52cp -r $ship/.urb/put/web/* $dist
53
53
54# First render with |static in urbit (docs)
54# First render with |static in urbit (docs)
55
55
56copy_static_site $site $ship
56copy_static_site $site $ship
57rm -rf $ship/home/web/posts
57rm -rf $ship/home/web/posts
58−read -n1 -s -r -p $'Wait for sync, then run |static in your urbit again, wait for it to finish, then press any key to continue\n'
58+read -n1 -s -r -p $'- Wait for sync, then run |static in your urbit again, wait for it to finish, then press any key to continue\n'
59
59
60# Copy results of second render (docs) to dist folder
60# Copy results of second render (docs) to dist folder
61
61
62−cp -rn $ship/.urb/put/web/* $dist # cp -n prevents overwriting exist folders
62+cp -rn $ship/.urb/put/web/* $dist # cp -n prevents overwriting existing folders
63
63
64# Remove unecessary files
64# Remove unecessary files
65
65
@@ -71,4 +71,4 @@ rm -rf $dist/js/*
71
71
72cp -r $site/static-site/js $dist
72cp -r $site/static-site/js $dist
73
73
74−echo -e "Find your website in $dist"
74+echo -e "- Find your website in $dist"