use correct quotes

This commit is contained in:
Ray Elliott 2020-03-20 20:06:14 +00:00
parent f2be3e63b3
commit 4afa67fc03
5 changed files with 13 additions and 13 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [ -z "$1" ] ; then if [ -z "$1" ] ; then
echo "deploy-script.sh: Error - Must supply script as argument" echo 'deploy-script.sh: Error - Must supply script as argument'
exit exit
else else
_script="$1" _script="$1"
@ -9,7 +9,7 @@ fi
. ./config.sh . ./config.sh
cat config.sh "$_script" | ssh root@"$_url" "cat >/tmp/deploy-script.sh" cat config.sh "$_script" | ssh root@"$_url" 'cat >/tmp/deploy-script.sh'
ssh root@"$_url" '/bin/bash /tmp/deploy-script.sh' ssh root@"$_url" '/bin/bash /tmp/deploy-script.sh'
ssh root@"$_url" '/bin/bash -c "rm /tmp/deploy-script.sh"' ssh root@"$_url" '/bin/bash -c "rm /tmp/deploy-script.sh"'

View File

@ -31,7 +31,7 @@ $_cmd_su "echo '/themes/' >> $_site_path/.gitignore"
$_cmd_su "echo 'node_modules/' >> $_site_path/.gitignore" $_cmd_su "echo 'node_modules/' >> $_site_path/.gitignore"
$_cmd_su "cd $_site_path && git add . && git commit -m 'initial commit'" $_cmd_su "cd $_site_path && git add . && git commit -m 'initial commit'"
echo "#!/bin/sh" > "$_serve_script_path" echo '#!/bin/sh' > "$_serve_script_path"
echo 'echo "sudo required to bind to port 80"' >> "$_serve_script_path" echo 'echo "sudo required to bind to port 80"' >> "$_serve_script_path"
echo "sudo hugo server -D --bind=0.0.0.0 --baseURL=http://$_url -p80" >> "$_serve_script_path" echo "sudo hugo server -D --bind=0.0.0.0 --baseURL=http://$_url -p80" >> "$_serve_script_path"
chown "$_user": "$_serve_script_path" chown "$_user": "$_serve_script_path"
@ -62,9 +62,9 @@ else
_theme_path='No theme installed' _theme_path='No theme installed'
fi fi
echo "" echo ''
echo "#################################################################################################" echo '#################################################################################################'
echo "" echo ''
tee $_site_path/README.txt << EOF tee $_site_path/README.txt << EOF
Site directory: $_site_path Site directory: $_site_path
Theme directory: $_theme_path Theme directory: $_theme_path
@ -75,7 +75,7 @@ Build script: $_build_script_path
Server script: $_serve_script_path Server script: $_serve_script_path
Server URL: http://$_url Server URL: http://$_url
EOF EOF
echo "" echo ''
echo "#################################################################################################" echo '#################################################################################################'
echo "" echo ''
chown "$_user": "$_site_path/README.txt" chown "$_user": "$_site_path/README.txt"

View File

@ -5,7 +5,7 @@ set -e
if command -v apt-get ; then if command -v apt-get ; then
apt-get -y install gnupg apt-get -y install gnupg
else else
echo "Error - no package installer found." echo 'Error - no package installer found.'
exit 1 exit 1
fi fi
@ -17,5 +17,5 @@ tar -xJvf node-"$_node_version"-"$_node_distro".tar.xz -C /usr/local/lib/nodejs
echo "PATH=/usr/local/lib/nodejs/node-$_node_version-$_node_distro/bin:$PATH" >> /home/"$_user"/.profile echo "PATH=/usr/local/lib/nodejs/node-$_node_version-$_node_distro/bin:$PATH" >> /home/"$_user"/.profile
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list echo 'deb https://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list
apt-get update && sudo apt-get -y install yarn apt-get update && sudo apt-get -y install yarn

View File

@ -17,7 +17,7 @@ if command -v apt-get ; then
mv /tmp/neovim/runtime /usr/local/share/nvim/runtime mv /tmp/neovim/runtime /usr/local/share/nvim/runtime
mv /tmp/neovim/build/bin/nvim /usr/local/bin/nvim mv /tmp/neovim/build/bin/nvim /usr/local/bin/nvim
else else
echo "Error - no package installer found." echo 'Error - no package installer found.'
exit 1 exit 1
fi fi

View File

@ -14,7 +14,7 @@ chage -d 0 "$_user"
if command -v apt-get ; then if command -v apt-get ; then
apt-get update && apt-get -y upgrade && apt-get -y install sudo git apt-get update && apt-get -y upgrade && apt-get -y install sudo git
else else
echo "Error - no package installer found." echo 'Error - no package installer found.'
exit 1 exit 1
fi fi