Add A2SERVER_SCRIPT_URL to aliases

This should theoretically make the a2server-setup and a2server-update
aliases use/honor A2SERVER_SCRIPT_URL if it's set.  How this is done is
presently kind of ugly since it invokes a subshell to ensure the URL
ends in a slash, so if someone has a better idea of how to do that in a
bash alias, please file a ticket!
This commit is contained in:
T. Joseph Carter 2015-10-04 07:51:34 -07:00
parent 171ffb52d8
commit 0afbc6dba1

View File

@ -1,12 +1,11 @@
#! /bin/bash #! /bin/bash
# A2SERVER aliases: # A2SERVER aliases:
alias a2server-help="more /usr/local/etc/a2server-help.txt" alias a2server-help="more /usr/local/etc/a2server-help.txt"
alias a2server-setup="wget -q -O /tmp/a2server-setup appleii.ivanx.com/a2server/setup/; source /tmp/a2server-setup" alias a2server-setup="wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}$([[ "$A2SERVER_SCRIPT_URL" == */ ]] || echo -n "/")setup/; source /tmp/a2server-setup"
alias a2server-version="cat /usr/local/etc/A2SERVER-version" alias a2server-version="cat /usr/local/etc/A2SERVER-version"
alias a2server-update="wget -q -O /tmp/a2server-update appleii.ivanx.com/a2server/update/; source /tmp/a2server-update" alias a2server-update="wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}$([[ "$A2SERVER_SCRIPT_URL" == */ ]] || echo -n "/")update/; source /tmp/a2server-update"
alias system-shutdown='sudo shutdown -h now' alias system-shutdown='sudo shutdown -h now'
alias system-restart='sudo shutdown -r now' alias system-restart='sudo shutdown -r now'