use rawgit.com for default A2SERVER_SCRIPT_URL

This commit is contained in:
Ivan X 2016-01-16 23:47:03 -05:00
parent 13343a5c2a
commit 60f88e4e8a
7 changed files with 10 additions and 10 deletions

View File

@ -7,7 +7,7 @@
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
esac
case "$A2SERVER_BINARY_URL" in
*/) binaryURL="$A2SERVER_BINARY_URL" ;;

View File

@ -17,7 +17,7 @@
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}/" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
esac
case "$A2SERVER_BINARY_URL" in
*/) binaryURL="$A2SERVER_BINARY_URL" ;;

View File

@ -10,7 +10,7 @@
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
esac
case "$A2SERVER_BINARY_URL" in
*/) binaryURL="$A2SERVER_BINARY_URL" ;;

View File

@ -2,10 +2,10 @@
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
alias a2server-help="more /usr/local/etc/a2server-help.txt"
alias a2server-setup="wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL}setup/index.txt || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-setup"
alias a2server-setup="wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/setup/index.txt || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-setup"
alias a2server-version="cat /usr/local/etc/A2SERVER-version"
alias a2server-update="wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL}update/index.txt || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-update"
alias a2server-update="wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/update/index.txt || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-update"
alias system-shutdown='sudo shutdown -h now'
alias system-restart='sudo shutdown -r now'

View File

@ -1,6 +1,6 @@
#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
export A2SERVER_SCRIPT_URL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server/}"
export A2SERVER_SCRIPT_URL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current/}"
export A2SERVER_BINARY_URL="${A2SERVER_BINARY_URL:-http://ivanx.com/a2server/files/}"
source /usr/local/etc/a2server-aliases

View File

@ -9,12 +9,12 @@
# to download and execute, type:
# wget ivanx.com/a2server/setup; source setup
a2serverVersion="132"
a2serverVersion="133"
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
esac
case "$A2SERVER_BINARY_URL" in
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
@ -35,7 +35,7 @@ if [[ -f /usr/local/etc/A2SERVER-version ]]; then
fi
echo
[[ $scriptURL != *"ivanx.com"* ]] && echo "Using script URL: $scriptURL"
[[ $scriptURL != *"ivanx.com"* && $scriptURL != *"rawgit.com"* ]] && echo "Using script URL: $scriptURL"
[[ $binaryURL != *"ivanx.com"* ]] && echo "Using binary URL: $binaryURL"
[[ ! $useExternalURL ]] && echo -e "Not using external URLs. Downloads must be available from:\n ${binaryURL}external/appleii/\n ${binaryURL}external/source/\n (See the A2SERVER developer page for more information.)"

View File

@ -4,7 +4,7 @@
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
esac
currentVersion=$(wget -qO- "${scriptURL}setup/index.txt" | grep '^a2serverVersion' | cut -d '"' -f 2)