Remove trailing whitespace from lines

This commit is contained in:
T. Joseph Carter 2015-10-30 05:38:31 -07:00
parent b07ab9faad
commit cf4bc9ea92
17 changed files with 122 additions and 122 deletions

View File

@ -6,7 +6,7 @@ if [[ ! $(dpkg -l irssi 2> /dev/null | grep '^ii') ]]; then
supo apt-get -y update supo apt-get -y update
sudo apt-get -y install irssi &> /dev/null sudo apt-get -y install irssi &> /dev/null
sudo apt-get -y clean sudo apt-get -y clean
fi fi
if [[ $1 == "-n" && $2 ]]; then if [[ $1 == "-n" && $2 ]]; then
nickname=$2 nickname=$2

View File

@ -21,7 +21,7 @@ showip : show the current ethernet IP address of the server
showmac : show the MAC (Ethernet hardware) address of the server showmac : show the MAC (Ethernet hardware) address of the server
showip-wifi : show the current wifi IP address of the server showip-wifi : show the current wifi IP address of the server
showmac-wifi : show the MAC (wifi hardware) address of the server showmac-wifi : show the MAC (wifi hardware) address of the server
ifreset : reset all network interfaces (requires restart) ifreset : reset all network interfaces (requires restart)
adtpro-stop : stop the ADTPro service adtpro-stop : stop the ADTPro service
adtpro-start : start the ADTPro service adtpro-start : start the ADTPro service
@ -45,7 +45,7 @@ vsd2 : show or set the disk image assigned to virtual drive 2
forfloppy : move the disk image to the ADTPro disk images folder forfloppy : move the disk image to the ADTPro disk images folder
(/usr/local/adtpro/disks) in preparation for transfer (/usr/local/adtpro/disks) in preparation for transfer
vsdsync : update ADTPro server with the current virtual drive images vsdsync : update ADTPro server with the current virtual drive images
nulib2 : create, extract, and work with NuFX (ShrinkIt) archive files nulib2 : create, extract, and work with NuFX (ShrinkIt) archive files
sciibin : decode BinSCII file (they start with 'FiLeStArTfIlEsTaRt') sciibin : decode BinSCII file (they start with 'FiLeStArTfIlEsTaRt')
unblu/usq/unbit/unexec : decode Binary II, Squeezed, Executioner, unblu/usq/unbit/unexec : decode Binary II, Squeezed, Executioner,

View File

@ -9,7 +9,7 @@ if [[ ! $(dpkg -l tin 2> /dev/null | grep '^ii') ]]; then
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install tin &> /dev/null sudo apt-get -y install tin &> /dev/null
sudo apt-get -y clean sudo apt-get -y clean
fi fi
if [[ $1 == "-h" || $1 == "--help" ]]; then if [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Usage: a2news [-s nntpServerAddress] [-m postingEmailAddress] [otherTinOptions]" echo "Usage: a2news [-s nntpServerAddress] [-m postingEmailAddress] [otherTinOptions]"
@ -17,13 +17,13 @@ if [[ $1 == "-h" || $1 == "--help" ]]; then
exit 1 exit 1
fi fi
while [[ $1 == "-s" || $1 == "-m" ]]; do while [[ $1 == "-s" || $1 == "-m" ]]; do
if [[ $1 == "-s" && $2 ]]; then if [[ $1 == "-s" && $2 ]]; then
nntpServer=$2 nntpServer=$2
shift shift
shift shift
fi fi
if [[ $1 == "-m" && $2 ]]; then if [[ $1 == "-m" && $2 ]]; then
emailAddress=$2 emailAddress=$2
shift shift

View File

@ -94,7 +94,7 @@ if [[ ( $arg1 == "-p" || $arg1 == "-c" || $arg1 == "-g" || $arg1 == "-e" ) && $2
[[ ! $3 ]] && outFile="${2##*/}" [[ ! $3 ]] && outFile="${2##*/}"
java -Xmx128m -jar "$adtPath"/lib/AppleCommander/AppleCommander-ac.jar $getArg "$imageArg" "$fileArg" $outFile 2> $acmdStdErr java -Xmx128m -jar "$adtPath"/lib/AppleCommander/AppleCommander-ac.jar $getArg "$imageArg" "$fileArg" $outFile 2> $acmdStdErr
else # put file else # put file
# test ProDOS name legitimacy # test ProDOS name legitimacy
prodosPath=$(tr [:lower:] [:upper:] <<< $prodosArg ) prodosPath=$(tr [:lower:] [:upper:] <<< $prodosArg )
IFS_orig="$IFS"; IFS="/"; IFS_orig="$IFS"; IFS="/";
@ -105,11 +105,11 @@ if [[ ( $arg1 == "-p" || $arg1 == "-c" || $arg1 == "-g" || $arg1 == "-e" ) && $2
fi fi
done done
IFS="$IFS_orig" IFS="$IFS_orig"
# process filetype # process filetype
[[ ${3:0:2} == "0x" ]] && ftArg="\$${3:2}" || ftArg="$3" [[ ${3:0:2} == "0x" ]] && ftArg="\$${3:2}" || ftArg="$3"
auxType="$4" auxType="$4"
# assume BIN/$2000 if filetype omitted # assume BIN/$2000 if filetype omitted
if [[ ! $ftArg ]]; then if [[ ! $ftArg ]]; then
ft="BIN" ft="BIN"
@ -130,7 +130,7 @@ if [[ ( $arg1 == "-p" || $arg1 == "-c" || $arg1 == "-g" || $arg1 == "-e" ) && $2
# set auxtype to $0801 for Applesoft programs if not specified # set auxtype to $0801 for Applesoft programs if not specified
[[ $ft == "BAS" && ! $auxType ]] && auxType="\$0801" [[ $ft == "BAS" && ! $auxType ]] && auxType="\$0801"
# test for absence of stdin [[ -t 0 ]] and if absent use ProDOS name # test for absence of stdin [[ -t 0 ]] and if absent use ProDOS name
if [[ -t 0 ]]; then if [[ -t 0 ]]; then
[[ ! -f $prodosArg ]] && { echoerr "$prodosArg not found."; exit 1; } [[ ! -f $prodosArg ]] && { echoerr "$prodosArg not found."; exit 1; }
@ -141,7 +141,7 @@ if [[ ( $arg1 == "-p" || $arg1 == "-c" || $arg1 == "-g" || $arg1 == "-e" ) && $2
java -Xmx128m -jar "$adtPath"/lib/AppleCommander/AppleCommander-ac.jar -p "$imageArg" $prodosPath $ft $auxType 2> $acmdStdErr java -Xmx128m -jar "$adtPath"/lib/AppleCommander/AppleCommander-ac.jar -p "$imageArg" $prodosPath $ft $auxType 2> $acmdStdErr
fi fi
fi fi
else else
imageArg="$2" imageArg="$2"

View File

@ -3,9 +3,9 @@
# don't do anything if ADTPro is already running # don't do anything if ADTPro is already running
if [[ $(ps aux | grep [A]DTPro) ]]; then if [[ $(ps aux | grep [A]DTPro) ]]; then
1&>2 echo "ADTPro server is already running." 1&>2 echo "ADTPro server is already running."
else else
# look for eligible USB-to-serial adapter # look for eligible USB-to-serial adapter
@ -20,7 +20,7 @@ else
elif [[ $(ls -1 /dev/ttyUSBupper_hub* 2> /dev/null | wc -l) -gt 1 ]]; then elif [[ $(ls -1 /dev/ttyUSBupper_hub* 2> /dev/null | wc -l) -gt 1 ]]; then
ttyUSB=$(ls -1 /dev/ttyUSBupper_hub* 2> /dev/null | head -1 | cut -c 6-) ttyUSB=$(ls -1 /dev/ttyUSBupper_hub* 2> /dev/null | head -1 | cut -c 6-)
fi fi
if [[ $ttyUSB ]]; then if [[ $ttyUSB ]]; then
echo -n "Please wait..." echo -n "Please wait..."
sudo nohup adtpro.sh headless serial &> /dev/null sudo nohup adtpro.sh headless serial &> /dev/null

View File

@ -54,7 +54,7 @@ if [ "$OS" = "Linux" ]; then
if [[ ! -c /dev/$serialPortName ]]; then if [[ ! -c /dev/$serialPortName ]]; then
echo "Serial port $serialPortName not found." 1>&2 echo "Serial port $serialPortName not found." 1>&2
usageExit usageExit
fi fi
elif [[ -c /dev/ttyUSBlower ]]; then elif [[ -c /dev/ttyUSBlower ]]; then
serialPortName=ttyUSBlower serialPortName=ttyUSBlower
elif [[ $(ls -1 /dev/ttyUSBlower_hub* 2> /dev/null | wc -l) -gt 0 ]]; then elif [[ $(ls -1 /dev/ttyUSBlower_hub* 2> /dev/null | wc -l) -gt 0 ]]; then
@ -68,9 +68,9 @@ if [ "$OS" = "Linux" ]; then
echo " any port on lower USB hub with no other adapters" echo " any port on lower USB hub with no other adapters"
echo " lowest port on USB hub on upper or lower USB port with multiple adapters" echo " lowest port on USB hub on upper or lower USB port with multiple adapters"
usageExit usageExit
fi fi
fi fi
if [[ $(grep CommPort= /usr/local/adtpro/disks/ADTPro.properties) ]]; then if [[ $(grep CommPort= /usr/local/adtpro/disks/ADTPro.properties) ]]; then
if [[ $serialPortName ]]; then if [[ $serialPortName ]]; then
sed -i "s/^CommPort=.*$/CommPort=\/dev\/$serialPortName/" /usr/local/adtpro/disks/ADTPro.properties &> /dev/null sed -i "s/^CommPort=.*$/CommPort=\/dev\/$serialPortName/" /usr/local/adtpro/disks/ADTPro.properties &> /dev/null
@ -83,7 +83,7 @@ if [ "$OS" = "Linux" ]; then
fi fi
ADTPRO_EXTRA_JAVA_PARMS="-Dgnu.io.rxtx.SerialPorts=/dev/$serialPortName" ADTPRO_EXTRA_JAVA_PARMS="-Dgnu.io.rxtx.SerialPorts=/dev/$serialPortName"
if [ -f /usr/bin/raspi-config ]; then if [ -f /usr/bin/raspi-config ]; then
export RXTXLIB=lib/rxtx/rxtx-2.2pre2-local/arm export RXTXLIB=lib/rxtx/rxtx-2.2pre2-local/arm
elif [ "$OS_ARCH" = "i686" ]; then elif [ "$OS_ARCH" = "i686" ]; then

View File

@ -134,7 +134,7 @@ def getFileName(arg1, arg2):
def getFileType(arg1, arg2): def getFileType(arg1, arg2):
start = getStartPos(arg1, arg2) start = getStartPos(arg1, arg2)
return readcharHex(g.imageData, start+16) return readcharHex(g.imageData, start+16)
def getKeyPointer(arg1, arg2): def getKeyPointer(arg1, arg2):
start = getStartPos(arg1, arg2) start = getStartPos(arg1, arg2)
return (readcharDec(g.imageData, start+17) + return (readcharDec(g.imageData, start+17) +
@ -366,7 +366,7 @@ def processEntry(arg1, arg2):
if g.PDOSPATH_SEGMENT: if g.PDOSPATH_SEGMENT:
syncExit() syncExit()
g.targetName = None g.targetName = None
#else: #else:
#print(g.activeFileName + " doesn't match " + g.PDOSPATH_SEGMENT) #print(g.activeFileName + " doesn't match " + g.PDOSPATH_SEGMENT)
@ -507,7 +507,7 @@ def binToDec(arg1):
# arg: binary string up to 8 bits # arg: binary string up to 8 bits
# out: decimal value # out: decimal value
return to_dec([arg1]) return to_dec([arg1])
def binToHex(arg1): def binToHex(arg1):
# converts single-byte binary string (8 bits) value to hex # converts single-byte binary string (8 bits) value to hex
# warning: no error checking # warning: no error checking
@ -701,10 +701,10 @@ def to_bytes(val):
else: else:
raise Exception( raise Exception(
"to_bytes() requires hex-ustr, int/long, or [bin-ustr]") "to_bytes() requires hex-ustr, int/long, or [bin-ustr]")
def shift(items): def shift(items):
"""Shift list items to left, losing the first item. """Shift list items to left, losing the first item.
in : list in : list
out: list out: list
""" """
@ -712,7 +712,7 @@ def shift(items):
items[i] = items[i+1] items[i] = items[i+1]
del items[-1] del items[-1]
return items return items
def s(string): def s(string):
"""Perform local variable substution, e.g. 'total: {num} items'""" """Perform local variable substution, e.g. 'total: {num} items'"""
# http://stackoverflow.com/questions/2960772/ # http://stackoverflow.com/questions/2960772/

View File

@ -10,7 +10,7 @@ if [[ "$1" == "-c" ]]; then
stdout=1; stdout=1;
else else
stdout= stdout=
fi fi
# use stdin? # use stdin?
if [[ ! $1 || "$1" == "-" ]]; then if [[ ! $1 || "$1" == "-" ]]; then
@ -26,13 +26,13 @@ fi
if [[ ! $stdout ]]; then if [[ ! $stdout ]]; then
#get filename extension, in lowercase #get filename extension, in lowercase
f="$(tr [:upper:] [:lower:] <<< ${1##*.})"; f="$(tr [:upper:] [:lower:] <<< ${1##*.})";
#if it's dsk/do/po, get name without extension #if it's dsk/do/po, get name without extension
[[ "$f" == "dsk" || "$f" == "do" || "$f" == "po" ]] && of="${1%.*}" || of="$1"; [[ "$f" == "dsk" || "$f" == "do" || "$f" == "po" ]] && of="${1%.*}" || of="$1";
#if name had .po extension, append .dsk to outfile name, otherwise append .po #if name had .po extension, append .dsk to outfile name, otherwise append .po
[[ "$f" == "po" ]] && of="$of.dsk" || of="$of.po" [[ "$f" == "po" ]] && of="$of.dsk" || of="$of.po"
# set outfile param for dd # set outfile param for dd
ofile="$of" ofile="$of"
else else
@ -44,7 +44,7 @@ if [[ ! $stdin ]]; then
ifile="$1" ifile="$1"
elif [[ -t 0 ]]; then elif [[ -t 0 ]]; then
echo "usage: dopo [-c] [-|140KdiskImageFilename]" 1>&2; exit 1; echo "usage: dopo [-c] [-|140KdiskImageFilename]" 1>&2; exit 1;
else else
ifile="/tmp/$$.dopo_in" ifile="/tmp/$$.dopo_in"
cat > "$ifile" cat > "$ifile"
fi fi

View File

@ -82,7 +82,7 @@ while read thisLine; do
if [[ ${thisLine:0:2} == "* " || ${thisLine:0:2} == " " ]]; then if [[ ${thisLine:0:2} == "* " || ${thisLine:0:2} == " " ]]; then
dosName=$(cut -c 5- <<< $thisLine | rev | sed 's/^[^ ]* [^ ]* [^ ]* [^ ]* [^ ]* \(.*$\)/\1/' | rev) dosName=$(cut -c 5- <<< $thisLine | rev | sed 's/^[^ ]* [^ ]* [^ ]* [^ ]* [^ ]* \(.*$\)/\1/' | rev)
if [[ ! $fileName || "$fileName" == "$dosName" ]]; then if [[ ! $fileName || "$fileName" == "$dosName" ]]; then
dosType=$(cut -c 3 <<< $thisLine) dosType=$(cut -c 3 <<< $thisLine)
if [[ $dosType == "A" ]]; then if [[ $dosType == "A" ]]; then
proType="BAS" proType="BAS"
@ -104,9 +104,9 @@ while read thisLine; do
echo "Error: Unknown DOS 3.3 file type." echo "Error: Unknown DOS 3.3 file type."
exit 2 exit 2
fi fi
proName=$(sed 's/^[^A-Za-z]/A/' <<< $dosName | sed 's/[^A-Za-z0-9\.]/./g') proName=$(sed 's/^[^A-Za-z]/A/' <<< $dosName | sed 's/[^A-Za-z0-9\.]/./g')
auxType= auxType=
[[ $binAddr ]] && auxType="\$$binAddr" [[ $binAddr ]] && auxType="\$$binAddr"
echo "Copying '$dosName' to '$proName'" echo "Copying '$dosName' to '$proName'"

View File

@ -11,14 +11,14 @@ else
echo "snd-pcm-oss" | sudo tee -a /etc/modules > /dev/null echo "snd-pcm-oss" | sudo tee -a /etc/modules > /dev/null
[[ ! $(lsmod | grep snd_pcm_oss) ]] && sudo modprobe snd-pcm-oss [[ ! $(lsmod | grep snd_pcm_oss) ]] && sudo modprobe snd-pcm-oss
fi fi
if [[ ! $(dpkg -l xfonts-base 2> /dev/null | grep '^ii') ]]; then if [[ ! $(dpkg -l xfonts-base 2> /dev/null | grep '^ii') ]]; then
echo "Configuring GSport fonts..." echo "Configuring GSport fonts..."
sudo apt-get -y update sudo apt-get -y update
touch /tmp/updated touch /tmp/updated
sudo apt-get -y install xfonts-base &> /dev/null sudo apt-get -y install xfonts-base &> /dev/null
sudo apt-get -y clean sudo apt-get -y clean
fi fi
if [[ ! $(dpkg -l libpcap0.8-dev 2> /dev/null | grep '^ii') ]]; then if [[ ! $(dpkg -l libpcap0.8-dev 2> /dev/null | grep '^ii') ]]; then
echo "Configuring GSport networking..." echo "Configuring GSport networking..."
@ -26,13 +26,13 @@ else
sudo apt-get -y install libpcap0.8-dev &> /dev/null sudo apt-get -y install libpcap0.8-dev &> /dev/null
sudo apt-get -y clean sudo apt-get -y clean
fi fi
rm /tmp/updated &> /dev/null rm /tmp/updated &> /dev/null
else else
gsport-setup gsport-setup
[[ $? -ne 0 ]] && exit 1 [[ $? -ne 0 ]] && exit 1
fi fi
displayOK= displayOK=
if [[ $DISPLAY ]]; then # X Window if [[ $DISPLAY ]]; then # X Window
displayOK=1 displayOK=1
@ -82,7 +82,7 @@ else
# touch /tmp/gsport-consolesetup # touch /tmp/gsport-consolesetup
# fi # fi
fi fi
if [[ ! $(grep 'input' <<< $(groups) ) ]]; then if [[ ! $(grep 'input' <<< $(groups) ) ]]; then
sudo groupadd input &> /dev/null sudo groupadd input &> /dev/null
sudo usermod -a -G input $USER sudo usermod -a -G input $USER
@ -105,7 +105,7 @@ else
fi fi
fi fi
fi fi
if [[ ! $DISPLAY && -f /tmp/gsport-consolesetup ]]; then if [[ ! $DISPLAY && -f /tmp/gsport-consolesetup ]]; then
echo "GSport will be ready for console use after you restart your system." echo "GSport will be ready for console use after you restart your system."
echo "You can restart now by typing 'system-restart'." echo "You can restart now by typing 'system-restart'."

View File

@ -11,13 +11,13 @@ else
echo "snd-pcm-oss" | sudo tee -a /etc/modules > /dev/null echo "snd-pcm-oss" | sudo tee -a /etc/modules > /dev/null
[[ ! $(lsmod | grep snd_pcm_oss) ]] && sudo modprobe snd-pcm-oss [[ ! $(lsmod | grep snd_pcm_oss) ]] && sudo modprobe snd-pcm-oss
fi fi
if [[ ! $(dpkg -l xfonts-base 2> /dev/null | grep '^ii') ]]; then if [[ ! $(dpkg -l xfonts-base 2> /dev/null | grep '^ii') ]]; then
echo "Configuring KEGS fonts..." echo "Configuring KEGS fonts..."
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install xfonts-base &> /dev/null sudo apt-get -y install xfonts-base &> /dev/null
sudo apt-get -y clean sudo apt-get -y clean
fi fi
exec xkegs exec xkegs
else else

View File

@ -22,7 +22,7 @@ else
echo 'SUBSYSTEM=="input", GROUP="input", MODE="0660"' | sudo tee /etc/udev/rules.d/99-input.rules > /dev/null echo 'SUBSYSTEM=="input", GROUP="input", MODE="0660"' | sudo tee /etc/udev/rules.d/99-input.rules > /dev/null
touch /tmp/linapple-consolesetup touch /tmp/linapple-consolesetup
fi fi
if [[ -c /dev/fb0 ]]; then if [[ -c /dev/fb0 ]]; then
[[ ! -f /tmp/linapple-consolesetup ]] && linappleOk=1 [[ ! -f /tmp/linapple-consolesetup ]] && linappleOk=1
else else
@ -38,7 +38,7 @@ else
fi fi
fi fi
fi fi
if [[ ! $DISPLAY && -f /tmp/linapple-consolesetup ]]; then if [[ ! $DISPLAY && -f /tmp/linapple-consolesetup ]]; then
echo "LinApple will be ready for console use after you restart your system." echo "LinApple will be ready for console use after you restart your system."
echo "You can restart now by typing 'system-restart'." echo "You can restart now by typing 'system-restart'."

View File

@ -3,8 +3,8 @@
# ID-bashByter routines # ID-bashByter routines
function binToDec () function binToDec ()
{ {
dec=0; dec=0;
bits=$1; bits=$1;
while (( ${#bits} < 8 )); do while (( ${#bits} < 8 )); do
@ -17,8 +17,8 @@ function binToDec ()
echo -n $dec echo -n $dec
}; };
function writecharDec () function writecharDec ()
{ {
[[ -n $1 ]] || return 11; [[ -n $1 ]] || return 11;
[[ -n $2 ]] || return 12; [[ -n $2 ]] || return 12;
[[ -n $3 ]] || return 13; [[ -n $3 ]] || return 13;
@ -28,8 +28,8 @@ function writecharDec ()
echo -n -e "\x$(printf %02X "$3")" | dd of="$1" bs=1 seek=$(($2)) conv=notrunc 2> /dev/null echo -n -e "\x$(printf %02X "$3")" | dd of="$1" bs=1 seek=$(($2)) conv=notrunc 2> /dev/null
}; };
function writecharsHex () function writecharsHex ()
{ {
[[ -n $1 ]] || return 11; [[ -n $1 ]] || return 11;
[[ -n $2 ]] || return 12; [[ -n $2 ]] || return 12;
[[ -n $3 ]] || return 13; [[ -n $3 ]] || return 13;
@ -115,7 +115,7 @@ if [[ ! $totalBlocks && $(tr [:upper:] [:lower:] <<< "${1##*.}") == "dsk" ]]; th
for s in 0 14 13 12 11 10 9 8 7 6 5 4 3 2 1 15; do for s in 0 14 13 12 11 10 9 8 7 6 5 4 3 2 1 15; do
dd bs=256 count=1 if="$1".tmp of="$1" skip=$(( $t*16 + $s )) seek=$(( $t*16 + ( $s==0||$s==15 ? $s : 15-$s ) )) 2> /dev/null; dd bs=256 count=1 if="$1".tmp of="$1" skip=$(( $t*16 + $s )) seek=$(( $t*16 + ( $s==0||$s==15 ? $s : 15-$s ) )) 2> /dev/null;
done; done;
done done
rm "$1".tmp rm "$1".tmp
fi fi
@ -146,7 +146,7 @@ if [[ ! $nulib2 && $totalBlocks ]]; then
dd if=/dev/zero of="$1" bs=1 seek=3072 count=$(( (fsbExtraBlocks > 8) + 1 )) conv=notrunc 2> /dev/null; dd if=/dev/zero of="$1" bs=1 seek=3072 count=$(( (fsbExtraBlocks > 8) + 1 )) conv=notrunc 2> /dev/null;
(( fsbExtraBlocks-- )); (( fsbExtraBlocks-- ));
fi; fi;
bits=$(( fsbExtraBlocks % 8 )); bits=$(( fsbExtraBlocks % 8 ));
if (( bits > 0 )); then if (( bits > 0 )); then
freeString="11111111"; freeString="11111111";

View File

@ -49,7 +49,7 @@ if [[ \
${partitions[1]:0:14} == "/dev/mmcblk0p2" && ${partitions[1]:57:2} == "85" && ${partitions[1]:0:14} == "/dev/mmcblk0p2" && ${partitions[1]:57:2} == "85" &&
${partitions[2]:0:14} == "/dev/mmcblk0p3" && ${partitions[2]:57:2} == "83" && ${partitions[2]:0:14} == "/dev/mmcblk0p3" && ${partitions[2]:57:2} == "83" &&
${partitions[3]:0:14} == "/dev/mmcblk0p5" && ${partitions[3]:57:2} == " c" && ${partitions[3]:0:14} == "/dev/mmcblk0p5" && ${partitions[3]:57:2} == " c" &&
${partitions[4]:0:14} == "/dev/mmcblk0p6" && ${partitions[4]:57:2} == "83" ]]; then ${partitions[4]:0:14} == "/dev/mmcblk0p6" && ${partitions[4]:57:2} == "83" ]]; then
noobs=" and the NOOBS install manager" noobs=" and the NOOBS install manager"
fi fi
@ -83,7 +83,7 @@ if [[ ! $noobsOnly ]]; then
{ cd /tmp; sudo apt-get -y autoremove; sudo apt-get -y autoclean; sudo apt-get -y clean; } > /dev/null { cd /tmp; sudo apt-get -y autoremove; sudo apt-get -y autoclean; sudo apt-get -y clean; } > /dev/null
freeSpace=$(df / | tail -1 | awk '{ print $4 }') freeSpace=$(df / | tail -1 | awk '{ print $4 }')
if (( $freeSpace < 400000 )); then if (( $freeSpace < 400000 )); then
if dpkg -l | grep -q wolfram-engine; then if dpkg -l | grep -q wolfram-engine; then
if [[ ! $autoYes ]]; then if [[ ! $autoYes ]]; then
echo "In order to create enough space on your SD card to upgrade," echo "In order to create enough space on your SD card to upgrade,"
echo "the Wolfram Language and Mathematica software packages must be removed." echo "the Wolfram Language and Mathematica software packages must be removed."
@ -180,7 +180,7 @@ if [[ $noobs ]]; then
grep -q 'disablesafemode' /tmp/p1/recovery.cmdline || sudo sed -i '1 s/^\(.*\)$/\1 disablesafemode/' /tmp/p1/recovery.cmdline grep -q 'disablesafemode' /tmp/p1/recovery.cmdline || sudo sed -i '1 s/^\(.*\)$/\1 disablesafemode/' /tmp/p1/recovery.cmdline
sudo umount /tmp/p1 sudo umount /tmp/p1
rmdir /tmp/p1 rmdir /tmp/p1
sudo sed -i 's/\(Raspple II release.*[^u]$\)/\1u/' /etc/issue sudo sed -i 's/\(Raspple II release.*[^u]$\)/\1u/' /etc/issue
fi fi

View File

@ -210,13 +210,13 @@ else
echo -n "? " echo -n "? "
read read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installADTPro=1 [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installADTPro=1
createBootDisk= createBootDisk=
installArchiveTools= installArchiveTools=
newImageName= newImageName=
imageSize= imageSize=
if [[ $installADTPro ]]; then if [[ $installADTPro ]]; then
echo echo
echo -n "Do you want to create A2CLOUD 140K and 800K boot disk images? " echo -n "Do you want to create A2CLOUD 140K and 800K boot disk images? "
read read
@ -224,7 +224,7 @@ else
createBootDisk=1 createBootDisk=1
installArchiveTools=1 installArchiveTools=1
fi fi
if [[ ! -f /usr/local/adtpro/disks/Virtual.po || ( -f /usr/local/adtpro/adtpro.sh && -f /usr/local/adtpro/disks/Virtual.po && $(sha1sum /usr/local/adtpro/disks/Virtual.po | cut -f 1 -d ' ') == "a209a8b3a485c95c57bc691a8a58867a6c0ec628" ) ]]; then if [[ ! -f /usr/local/adtpro/disks/Virtual.po || ( -f /usr/local/adtpro/adtpro.sh && -f /usr/local/adtpro/disks/Virtual.po && $(sha1sum /usr/local/adtpro/disks/Virtual.po | cut -f 1 -d ' ') == "a209a8b3a485c95c57bc691a8a58867a6c0ec628" ) ]]; then
while (( 1 )); do while (( 1 )); do
echo echo
@ -259,32 +259,32 @@ else
done done
fi fi
fi fi
setupSerialPortLogin= setupSerialPortLogin=
echo echo
echo -n "Do you want to set up your $me for serial port login? " echo -n "Do you want to set up your $me for serial port login? "
read read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && setupSerialPortLogin=1 [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && setupSerialPortLogin=1
installCommTools= installCommTools=
echo echo
echo -n "Install internet access and file transfer tools on your $me? " echo -n "Install internet access and file transfer tools on your $me? "
read read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installCommTools=1 [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installCommTools=1
if [[ ! $installArchiveTools ]]; then if [[ ! $installArchiveTools ]]; then
echo echo
echo -n "Install utilities for Apple II archives and disk images? " echo -n "Install utilities for Apple II archives and disk images? "
read read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installArchiveTools=1 [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installArchiveTools=1
fi fi
installEmulators= installEmulators=
echo echo
echo -n "Install Apple IIgs and IIe emulators? " echo -n "Install Apple IIgs and IIe emulators? "
read read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installEmulators=1 [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installEmulators=1
installA2Pi= installA2Pi=
if [[ $isRpi ]]; then if [[ $isRpi ]]; then
echo echo
@ -293,7 +293,7 @@ else
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installA2Pi=1 [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installA2Pi=1
fi fi
fi fi
echo echo
userPw=$(sudo grep "^$USER" /etc/shadow | cut -f 2 -d ':') userPw=$(sudo grep "^$USER" /etc/shadow | cut -f 2 -d ':')
[[ $userPw == "$(echo 'apple2' | perl -e '$_ = <STDIN>; chomp; print crypt($_, $ARGV[0])' "${userPw%"${userPw#\$*\$*\$}"}")" ]] && isApple2Pw=1 || isApple2Pw= [[ $userPw == "$(echo 'apple2' | perl -e '$_ = <STDIN>; chomp; print crypt($_, $ARGV[0])' "${userPw%"${userPw#\$*\$*\$}"}")" ]] && isApple2Pw=1 || isApple2Pw=
@ -404,7 +404,7 @@ else
fi fi
if [[ $installADTPro ]]; then if [[ $installADTPro ]]; then
freeSpace=$(df / | tail -1 | awk '{ print $4 }') freeSpace=$(df / | tail -1 | awk '{ print $4 }')
java -version &> /dev/null java -version &> /dev/null
if (( $? == 127 && $freeSpace < 350000 )); then if (( $? == 127 && $freeSpace < 350000 )); then
@ -421,7 +421,7 @@ if [[ $installADTPro ]]; then
echo echo
[[ $0 == "-bash" ]] && return 3 || exit 3 [[ $0 == "-bash" ]] && return 3 || exit 3
fi fi
if [[ ! -f /usr/bin/X ]]; then if [[ ! -f /usr/bin/X ]]; then
echo "A2CLOUD: Installing X Window System and LXDE..." echo "A2CLOUD: Installing X Window System and LXDE..."
sudo apt-get -y install xorg lxde sudo apt-get -y install xorg lxde
@ -432,7 +432,7 @@ if [[ $installADTPro ]]; then
else else
echo "A2CLOUD: X Window System and LXDE are already installed." echo "A2CLOUD: X Window System and LXDE are already installed."
fi fi
# if [[ ! -f /etc/xdg/autostart/lxterminal.desktop ]]; then # if [[ ! -f /etc/xdg/autostart/lxterminal.desktop ]]; then
# echo "A2CLOUD: Setting terminal window to auto-open on desktop..." # echo "A2CLOUD: Setting terminal window to auto-open on desktop..."
# echo -e "\n[Desktop Entry]\nType=Application\nExec=/usr/bin/lxterminal" | sudo tee /etc/xdg/autostart/lxterminal.desktop > /dev/null # echo -e "\n[Desktop Entry]\nType=Application\nExec=/usr/bin/lxterminal" | sudo tee /etc/xdg/autostart/lxterminal.desktop > /dev/null
@ -460,7 +460,7 @@ if [[ $installADTPro ]]; then
sudo sed -i 's/^.*VBOX0.*$//' /etc/xdg/lxsession/LXDE/autostart 2> /dev/null sudo sed -i 's/^.*VBOX0.*$//' /etc/xdg/lxsession/LXDE/autostart 2> /dev/null
sudo sed -i 's/^.*VBOX0.*$//' /etc/xdg/lxsession/LXDE-pi/autostart 2> /dev/null sudo sed -i 's/^.*VBOX0.*$//' /etc/xdg/lxsession/LXDE-pi/autostart 2> /dev/null
fi fi
# install or update java # install or update java
javaVersion=$(java -version 2>&1) javaVersion=$(java -version 2>&1)
if [[ ( $? -eq 127 ) || ( $(head -1 <<< "$javaVersion" | cut -f 2 -d '.') -lt 8 ) ]]; then if [[ ( $? -eq 127 ) || ( $(head -1 <<< "$javaVersion" | cut -f 2 -d '.') -lt 8 ) ]]; then
@ -492,7 +492,7 @@ if [[ $installADTPro ]]; then
else else
echo "A2CLOUD: Java is already installed." echo "A2CLOUD: Java is already installed."
fi fi
updateADTPro= updateADTPro=
# check if update needed # check if update needed
if [ -f /usr/local/adtpro/lib/ADTPro-* ]; then if [ -f /usr/local/adtpro/lib/ADTPro-* ]; then
@ -527,7 +527,7 @@ if [[ $installADTPro ]]; then
echo "A2CLOUD: ADTPro server does not need updating." echo "A2CLOUD: ADTPro server does not need updating."
fi fi
fi fi
if [[ ! -f /usr/local/adtpro/adtpro.sh || ! -f /usr/local/adtpro/ADTPro.html ]]; then if [[ ! -f /usr/local/adtpro/adtpro.sh || ! -f /usr/local/adtpro/ADTPro.html ]]; then
echo "A2CLOUD: installing ADTPro server..." echo "A2CLOUD: installing ADTPro server..."
sudo pkill -f [A]DTPro sudo pkill -f [A]DTPro
@ -554,7 +554,7 @@ if [[ $installADTPro ]]; then
else else
echo "A2CLOUD: AppleCommander-1.3.5.13id is already installed." echo "A2CLOUD: AppleCommander-1.3.5.13id is already installed."
fi fi
echo "A2CLOUD: Setting up customized adtpro.sh..." echo "A2CLOUD: Setting up customized adtpro.sh..."
wget -qO /usr/local/adtpro/adtpro.sh ivanx.com/a2cloud/setup/adtpro.sh.txt wget -qO /usr/local/adtpro/adtpro.sh ivanx.com/a2cloud/setup/adtpro.sh.txt
sudo chmod ugo+rwx /usr/local/adtpro/adtpro.sh sudo chmod ugo+rwx /usr/local/adtpro/adtpro.sh
@ -564,7 +564,7 @@ if [[ $installADTPro ]]; then
sudo mv /tmp/a2cloud-install/disks/* /usr/local/adtpro/disks sudo mv /tmp/a2cloud-install/disks/* /usr/local/adtpro/disks
sudo rmdir /tmp/a2cloud-install/disks sudo rmdir /tmp/a2cloud-install/disks
fi fi
if [[ ! -f /usr/lib/jni/librxtxSerial.so ]]; then if [[ ! -f /usr/lib/jni/librxtxSerial.so ]]; then
echo "A2CLOUD: Installing serial port libraries..." echo "A2CLOUD: Installing serial port libraries..."
sudo apt-get -y install librxtx-java sudo apt-get -y install librxtx-java
@ -574,7 +574,7 @@ if [[ $installADTPro ]]; then
fi fi
[[ ! -f /usr/lib/RXTXcomm.jar ]] && sudo ln -s /usr/share/java/RXTXcomm.jar /usr/lib &> /dev/null [[ ! -f /usr/lib/RXTXcomm.jar ]] && sudo ln -s /usr/share/java/RXTXcomm.jar /usr/lib &> /dev/null
[[ ! -d /usr/local/adtpro/lib/rxtx/rxtx-2.2pre2-local/arm ]] && ln -s /usr/lib/jni /usr/local/adtpro/lib/rxtx/rxtx-2.2pre2-local/arm &> /dev/null [[ ! -d /usr/local/adtpro/lib/rxtx/rxtx-2.2pre2-local/arm ]] && ln -s /usr/lib/jni /usr/local/adtpro/lib/rxtx/rxtx-2.2pre2-local/arm &> /dev/null
if [[ ! -f /usr/bin/xvfb-run ]]; then if [[ ! -f /usr/bin/xvfb-run ]]; then
echo "A2CLOUD: Installing xvfb for headless operation..."cd echo "A2CLOUD: Installing xvfb for headless operation..."cd
sudo apt-get -y install xvfb sudo apt-get -y install xvfb
@ -582,7 +582,7 @@ if [[ $installADTPro ]]; then
else else
echo "A2CLOUD: xvfb is already installed." echo "A2CLOUD: xvfb is already installed."
fi fi
if [[ -f /usr/local/sbin/afpd ]]; then # A2SERVER/netatalk installed if [[ -f /usr/local/sbin/afpd ]]; then # A2SERVER/netatalk installed
if [[ ! -d /media/A2SHARED/ADTDISKS || ! $(grep ADTDISKS /usr/local/etc/netatalk/AppleVolumes.default) ]]; then if [[ ! -d /media/A2SHARED/ADTDISKS || ! $(grep ADTDISKS /usr/local/etc/netatalk/AppleVolumes.default) ]]; then
echo "A2CLOUD: Setting up /usr/local/adtpro/disks for Apple file sharing..." echo "A2CLOUD: Setting up /usr/local/adtpro/disks for Apple file sharing..."
@ -596,7 +596,7 @@ if [[ $installADTPro ]]; then
else else
echo "A2CLOUD: /usr/local/adtpro/disks is already set up for Apple file sharing." echo "A2CLOUD: /usr/local/adtpro/disks is already set up for Apple file sharing."
fi fi
if { grep -q A2SHARED /etc/samba/smb.conf 2> /dev/null; }; then if { grep -q A2SHARED /etc/samba/smb.conf 2> /dev/null; }; then
# SMB already enabled by A2SERVER # SMB already enabled by A2SERVER
if { grep -q ADTDISKS /etc/samba/smb.conf 2>/dev/null; }; then if { grep -q ADTDISKS /etc/samba/smb.conf 2>/dev/null; }; then
@ -651,7 +651,7 @@ else
fi fi
if [[ $setupSerialPortLogin ]]; then if [[ $setupSerialPortLogin ]]; then
echo "A2CLOUD: Setting GPIO serial login to 4800 bps, and disabling..." echo "A2CLOUD: Setting GPIO serial login to 4800 bps, and disabling..."
# set console port login to 4800 bps (using RPi console cable) and comment it out # set console port login to 4800 bps (using RPi console cable) and comment it out
sudo sed -i 's/^\(T.*\)ttyAMA0 .* /#\1ttyAMA0 4800 /' /etc/inittab sudo sed -i 's/^\(T.*\)ttyAMA0 .* /#\1ttyAMA0 4800 /' /etc/inittab
@ -691,7 +691,7 @@ if [[ $setupSerialPortLogin ]]; then
else else
echo "A2CLOUD: Serial port login is already using 8-bit character set." echo "A2CLOUD: Serial port login is already using 8-bit character set."
fi fi
echo "A2CLOUD: Setting up baud command..." echo "A2CLOUD: Setting up baud command..."
sudo wget -qO /usr/local/bin/baud ${scriptURL}setup/baud.txt sudo wget -qO /usr/local/bin/baud ${scriptURL}setup/baud.txt
sudo chmod ugo+x /usr/local/bin/baud sudo chmod ugo+x /usr/local/bin/baud
@ -703,7 +703,7 @@ if [[ $setupSerialPortLogin ]]; then
echo "A2CLOUD: Setting up usbgetty command..." echo "A2CLOUD: Setting up usbgetty command..."
sudo wget -qO /usr/local/sbin/usbgetty ${scriptURL}setup/usbgetty.txt sudo wget -qO /usr/local/sbin/usbgetty ${scriptURL}setup/usbgetty.txt
sudo chmod ugo+x /usr/local/sbin/usbgetty sudo chmod ugo+x /usr/local/sbin/usbgetty
echo "A2CLOUD: Removing ttyUSB0 shell login..." echo "A2CLOUD: Removing ttyUSB0 shell login..."
sudo sed -i "s/^\([^#].*ttyUSB0.*\)$//" /etc/inittab sudo sed -i "s/^\([^#].*ttyUSB0.*\)$//" /etc/inittab
@ -714,7 +714,7 @@ if [[ $setupSerialPortLogin ]]; then
sudo pkill -f "[g]etty.*ttyUSB" sudo pkill -f "[g]etty.*ttyUSB"
else else
echo "A2CLOUD: USB port shell login already added." echo "A2CLOUD: USB port shell login already added."
fi fi
fi fi
@ -726,7 +726,7 @@ if [[ ! -f /etc/udev/rules.d/50-usb.rules ]]; then
echo "A2CLOUD: Creating device rules for USB ports..." echo "A2CLOUD: Creating device rules for USB ports..."
udevLines= udevLines=
if [[ $isRpi ]]; then if [[ $isRpi ]]; then
# assign ttyUSBupper, or ttyUSBupper_hubXX, for shell usb-to-serial adapter # assign ttyUSBupper, or ttyUSBupper_hubXX, for shell usb-to-serial adapter
# assign ttyUSBlower, or ttyUSBlower_hubXX, for ADTPro usb-to-serial adapter # assign ttyUSBlower, or ttyUSBlower_hubXX, for ADTPro usb-to-serial adapter
# (A/A+ direct attach is always ttyUSBlower; # (A/A+ direct attach is always ttyUSBlower;
# hub attached to A/A+ will be ttyUSBupper on port 2, and ttyUSBlower on port 3) # hub attached to A/A+ will be ttyUSBupper on port 2, and ttyUSBlower on port 3)
@ -761,7 +761,7 @@ if [[ $installCommTools ]]; then
if [[ ! -f /usr/bin/curl ]]; then if [[ ! -f /usr/bin/curl ]]; then
echo "A2CLOUD: Installing curl..." echo "A2CLOUD: Installing curl..."
sudo apt-get -y install curl sudo apt-get -y install curl
sudo apt-get -y clean sudo apt-get -y clean
else else
echo "A2CLOUD: curl is already installed." echo "A2CLOUD: curl is already installed."
fi fi
@ -773,7 +773,7 @@ if [[ $installCommTools ]]; then
else else
echo "A2CLOUD: rzsz is already installed." echo "A2CLOUD: rzsz is already installed."
fi fi
if [[ ! -f /usr/bin/ftp ]]; then if [[ ! -f /usr/bin/ftp ]]; then
echo "A2CLOUD: Installing ftp..." echo "A2CLOUD: Installing ftp..."
sudo apt-get -y install ftp sudo apt-get -y install ftp
@ -781,7 +781,7 @@ if [[ $installCommTools ]]; then
else else
echo "A2CLOUD: ftp is already installed." echo "A2CLOUD: ftp is already installed."
fi fi
if [[ ! -f /usr/local/bin/cftp ]]; then if [[ ! -f /usr/local/bin/cftp ]]; then
echo "A2CLOUD: Installing cftp..." echo "A2CLOUD: Installing cftp..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
@ -811,7 +811,7 @@ if [[ $installCommTools ]]; then
else else
echo "A2CLOUD: cftp is already installed." echo "A2CLOUD: cftp is already installed."
fi fi
if [[ ! -f /usr/bin/lynx ]]; then if [[ ! -f /usr/bin/lynx ]]; then
echo "A2CLOUD: Installing lynx..." echo "A2CLOUD: Installing lynx..."
sudo apt-get -y install lynx sudo apt-get -y install lynx
@ -874,7 +874,7 @@ if [[ $installCommTools ]]; then
if [[ ( ! -f /usr/bin/ttytter && ! -f /usr/local/bin/ttytter ) || ! -f "/usr/local/share/perl/5.14.2/Term/ReadLine/TTYtter.pm" ]]; then if [[ ( ! -f /usr/bin/ttytter && ! -f /usr/local/bin/ttytter ) || ! -f "/usr/local/share/perl/5.14.2/Term/ReadLine/TTYtter.pm" ]]; then
echo "A2CLOUD: Installing TTYtter..." echo "A2CLOUD: Installing TTYtter..."
sudo wget -qO /usr/local/bin/ttytter http://www.floodgap.com/software/ttytter/dist2/2.1.00.txt sudo wget -qO /usr/local/bin/ttytter http://www.floodgap.com/software/ttytter/dist2/2.1.00.txt
sudo chmod ugo+x /usr/local/bin/ttytter sudo chmod ugo+x /usr/local/bin/ttytter
perlVersion=$(perl -e 'print $^V' | cut -c 2-) perlVersion=$(perl -e 'print $^V' | cut -c 2-)
if [[ ! -f "/usr/local/share/perl/$perlVersion/Term/ReadLine/TTYtter.pm" ]]; then if [[ ! -f "/usr/local/share/perl/$perlVersion/Term/ReadLine/TTYtter.pm" ]]; then
echo "A2CLOUD: Installing TTYtter readline module..." echo "A2CLOUD: Installing TTYtter readline module..."
@ -923,7 +923,7 @@ if [[ $installA2Pi ]]; then
echo "deb http://schmenk.is-a-geek.com/raspbian wheezy contrib" | sudo tee -a /etc/apt/sources.list > /dev/null echo "deb http://schmenk.is-a-geek.com/raspbian wheezy contrib" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update > /dev/null sudo apt-get -y update > /dev/null
fi fi
sudo apt-get -y --force-yes install a2pi sudo apt-get -y --force-yes install a2pi
sudo apt-get -y clean sudo apt-get -y clean
else else
echo "A2CLOUD: Apple II Pi is already installed." echo "A2CLOUD: Apple II Pi is already installed."
@ -954,7 +954,7 @@ if [[ $installA2Pi ]]; then
wget -qO- ivanx.com/a2cloud/files/slot6-gsport-rpi.tgz | sudo tar Pzx 2> /dev/null wget -qO- ivanx.com/a2cloud/files/slot6-gsport-rpi.tgz | sudo tar Pzx 2> /dev/null
fi fi
fi fi
# set AppleTalk to turbo # set AppleTalk to turbo
if ! grep -q 'g_appletalk_turbo' /usr/share/gsport/config.txt; then if ! grep -q 'g_appletalk_turbo' /usr/share/gsport/config.txt; then
if grep -q 'bram1[00]' /usr/share/gsport/config.txt; then if grep -q 'bram1[00]' /usr/share/gsport/config.txt; then
@ -963,7 +963,7 @@ if [[ $installA2Pi ]]; then
echo -e '\ng_appletalk_turbo = 1' | sudo tee -a /usr/share/gsport/config.txt > /dev/null echo -e '\ng_appletalk_turbo = 1' | sudo tee -a /usr/share/gsport/config.txt > /dev/null
fi fi
fi fi
sudo sed -i 's/^g_appletalk_turbo = 0/g_appletalk_turbo = 1/' /usr/share/gsport/config.txt sudo sed -i 's/^g_appletalk_turbo = 0/g_appletalk_turbo = 1/' /usr/share/gsport/config.txt
# enable Uthernet # enable Uthernet
if ! grep -q 'g_ethernet[^_]' /usr/share/gsport/config.txt; then if ! grep -q 'g_ethernet[^_]' /usr/share/gsport/config.txt; then
@ -973,12 +973,12 @@ if [[ $installA2Pi ]]; then
echo -e '\ng_ethernet = 1' | sudo tee -a /usr/share/gsport/config.txt > /dev/null echo -e '\ng_ethernet = 1' | sudo tee -a /usr/share/gsport/config.txt > /dev/null
fi fi
fi fi
sudo sed -i 's/^g_ethernet = 0/g_ethernet = 1/' /usr/share/gsport/config.txt sudo sed -i 's/^g_ethernet = 0/g_ethernet = 1/' /usr/share/gsport/config.txt
fi fi
if [[ $installEmulators ]]; then if [[ $installEmulators ]]; then
# KEGS # KEGS
if [[ ! -f /usr/local/bin/xkegs ]]; then if [[ ! -f /usr/local/bin/xkegs ]]; then
echo "A2CLOUD: Installing KEGS..." echo "A2CLOUD: Installing KEGS..."
@ -1037,7 +1037,7 @@ if [[ $installEmulators ]]; then
sudo wget -qO /usr/local/bin/kegs-setup ${scriptURL}setup/kegs-setup-shell.txt sudo wget -qO /usr/local/bin/kegs-setup ${scriptURL}setup/kegs-setup-shell.txt
sudo chmod ugo+x /usr/local/bin/kegs-setup sudo chmod ugo+x /usr/local/bin/kegs-setup
# GSport, if non-RPi # GSport, if non-RPi
if [[ ! $isRpi && ! -f /usr/local/bin/gsport ]]; then if [[ ! $isRpi && ! -f /usr/local/bin/gsport ]]; then
echo "A2CLOUD: Installing GSport..." echo "A2CLOUD: Installing GSport..."
@ -1081,7 +1081,7 @@ if [[ $installEmulators ]]; then
if [[ $slot6 ]]; then if [[ $slot6 ]]; then
echo "A2CLOUD: Putting blank disks in GSport slot 6..." echo "A2CLOUD: Putting blank disks in GSport slot 6..."
sudo sed -i 's@^s6d1.*$@s6d1 = /usr/local/share/gsdisks/slot6drive1.po@' /usr/local/lib/config.txt sudo sed -i 's@^s6d1.*$@s6d1 = /usr/local/share/gsdisks/slot6drive1.po@' /usr/local/lib/config.txt
sudo sed -i 's@^s6d2.*$@s6d2 = /usr/local/share/gsdisks/slot6drive2.po@' /usr/local/lib/config.txt sudo sed -i 's@^s6d2.*$@s6d2 = /usr/local/share/gsdisks/slot6drive2.po@' /usr/local/lib/config.txt
if [[ ! -f /usr/local/share/gsdisks/slot6drive1.po || ! -f /usr/local/share/gsdisks/slot6drive2.po ]]; then if [[ ! -f /usr/local/share/gsdisks/slot6drive1.po || ! -f /usr/local/share/gsdisks/slot6drive2.po ]]; then
wget -qO- http://appleii.ivanx.com/a2cloud/files/slot6.tgz | sudo tar Pzx 2> /dev/null wget -qO- http://appleii.ivanx.com/a2cloud/files/slot6.tgz | sudo tar Pzx 2> /dev/null
@ -1170,7 +1170,7 @@ fi
if [[ $installArchiveTools ]]; then if [[ $installArchiveTools ]]; then
if [[ ! -f /usr/local/bin/nulib2 || ! -f /usr/local/bin/sciibin || ! -f /usr/local/bin/usq ]]; then if [[ ! -f /usr/local/bin/nulib2 || ! -f /usr/local/bin/sciibin || ! -f /usr/local/bin/usq ]]; then
echo "A2CLOUD: Installing nulib2, sciibin, unblu, unbit, unexec, usq..." echo "A2CLOUD: Installing nulib2, sciibin, unblu, unbit, unexec, usq..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
@ -1214,7 +1214,7 @@ if [[ $installArchiveTools ]]; then
wget -q http://web.archive.org/web/20110619163030/http://fadden.com/dl-apple2/undoit.zip wget -q http://web.archive.org/web/20110619163030/http://fadden.com/dl-apple2/undoit.zip
unzip undoit.zip unzip undoit.zip
make make
sudo mv sciibin unbit unblu unexec usq /usr/local/bin sudo mv sciibin unbit unblu unexec usq /usr/local/bin
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
rm -rf undoit rm -rf undoit
fi fi
@ -1269,7 +1269,7 @@ fi
# add shortcuts to LXDE desktop and menu # add shortcuts to LXDE desktop and menu
if [[ -f /usr/bin/X ]]; then if [[ -f /usr/bin/X ]]; then
[[ -d /etc/xdg/lxsession/LXDE-pi ]] && lxde="lxde-pi" || lxde="lxde" [[ -d /etc/xdg/lxsession/LXDE-pi ]] && lxde="lxde-pi" || lxde="lxde"
echo "A2CLOUD: Creating LXDE desktop and menu shortcuts..." echo "A2CLOUD: Creating LXDE desktop and menu shortcuts..."
@ -1300,7 +1300,7 @@ if [[ -f /usr/bin/X ]]; then
fi fi
if [[ ! -f /usr/local/share/gsport32.ico ]]; then if [[ ! -f /usr/local/share/gsport32.ico ]]; then
sudo wget -qO /usr/local/share/gsport32.ico http://appleii.ivanx.com/a2cloud/files/gsport32.ico sudo wget -qO /usr/local/share/gsport32.ico http://appleii.ivanx.com/a2cloud/files/gsport32.ico
fi fi
# KEGS: # KEGS:
if [[ -f /usr/local/bin/kegs ]]; then if [[ -f /usr/local/bin/kegs ]]; then
echo -e "[Desktop Entry]\nName=KEGS\nComment=Apple IIgs Emulator\nExec=lxterminal -e /usr/local/bin/kegs\nIcon=/usr/local/share/kegsicon.png\nTerminal=false\nType=Application\nCategories=AppleII\n" | sudo tee /usr/local/share/applications/kegs.desktop > /dev/null echo -e "[Desktop Entry]\nName=KEGS\nComment=Apple IIgs Emulator\nExec=lxterminal -e /usr/local/bin/kegs\nIcon=/usr/local/share/kegsicon.png\nTerminal=false\nType=Application\nCategories=AppleII\n" | sudo tee /usr/local/share/applications/kegs.desktop > /dev/null
@ -1308,7 +1308,7 @@ if [[ -f /usr/bin/X ]]; then
fi fi
if [[ ! -f /usr/local/share/kegsicon.png ]]; then if [[ ! -f /usr/local/share/kegsicon.png ]]; then
sudo wget -qO /usr/local/share/kegsicon.png http://appleii.ivanx.com/a2cloud/files/kegsicon.png sudo wget -qO /usr/local/share/kegsicon.png http://appleii.ivanx.com/a2cloud/files/kegsicon.png
fi fi
# LinApple: # LinApple:
if [[ -f /usr/local/bin/linapple ]]; then if [[ -f /usr/local/bin/linapple ]]; then
echo -e "[Desktop Entry]\nName=LinApple\nComment=Apple IIe Emulator\nExec=lxterminal -e /usr/local/bin/linapple\nIcon=/usr/local/linapple/icon.bmp\nTerminal=false\nType=Application\nCategories=AppleII\n" | sudo tee /usr/local/share/applications/linapple.desktop > ~/Desktop/linapple.desktop echo -e "[Desktop Entry]\nName=LinApple\nComment=Apple IIe Emulator\nExec=lxterminal -e /usr/local/bin/linapple\nIcon=/usr/local/linapple/icon.bmp\nTerminal=false\nType=Application\nCategories=AppleII\n" | sudo tee /usr/local/share/applications/linapple.desktop > ~/Desktop/linapple.desktop
@ -1394,7 +1394,7 @@ if [[ $a2CloudDisk ]]; then
# build if we don't have a disk image # build if we don't have a disk image
# (because download failed or -b argument was used) # (because download failed or -b argument was used)
if [[ ! -f $a2CloudDisk || ( $(wc -c $a2CloudDisk | cut -f 1 -d ' ') != "819200" ) ]]; then if [[ ! -f $a2CloudDisk || ( $(wc -c $a2CloudDisk | cut -f 1 -d ' ') != "819200" ) ]]; then
# start with a disk image # start with a disk image
echo "A2CLOUD: Creating 800K disk image..." echo "A2CLOUD: Creating 800K disk image..."
cp /usr/local/adtpro/disks/ADTPRO-*PO $a2CloudDisk cp /usr/local/adtpro/disks/ADTPRO-*PO $a2CloudDisk
@ -1402,7 +1402,7 @@ if [[ $a2CloudDisk ]]; then
# ADTPro # ADTPro
echo "A2CLOUD: Preparing ADTPro..." echo "A2CLOUD: Preparing ADTPro..."
acmd -d "$a2CloudDisk" BASIC acmd -d "$a2CloudDisk" BASIC
acmd -d "$a2CloudDisk" STARTUP.SYSTEM acmd -d "$a2CloudDisk" STARTUP.SYSTEM
acmd -d "$a2CloudDisk" ADTPRO acmd -d "$a2CloudDisk" ADTPRO
@ -1413,12 +1413,12 @@ if [[ $a2CloudDisk ]]; then
acmd -g SystemTools1.dc42 BASIC.SYSTEM - | acmd -p "$a2CloudDisk" BASIC.SYSTEM SYS acmd -g SystemTools1.dc42 BASIC.SYSTEM - | acmd -p "$a2CloudDisk" BASIC.SYSTEM SYS
# use our startup program # use our startup program
wget -qO- http://appleii.ivanx.com/a2cloud/files/STARTUP.BAS | acmd -p "$a2CloudDisk" STARTUP BAS wget -qO- http://appleii.ivanx.com/a2cloud/files/STARTUP.BAS | acmd -p "$a2CloudDisk" STARTUP BAS
# VEDRIVE # VEDRIVE
echo "A2CLOUD: Copying VEDRIVE..." echo "A2CLOUD: Copying VEDRIVE..."
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE - | acmd -p "$a2CloudDisk" VEDRIVE SYS acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE - | acmd -p "$a2CloudDisk" VEDRIVE SYS
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE.CONFIG - | acmd -p "$a2CloudDisk" VEDRIVE.CONFIG BAS acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE.CONFIG - | acmd -p "$a2CloudDisk" VEDRIVE.CONFIG BAS
# Apple System Utilities 3.1 support files # Apple System Utilities 3.1 support files
if [[ -f /usr/local/bin/unar ]]; then if [[ -f /usr/local/bin/unar ]]; then
echo "A2CLOUD: Downloading and copying System Utilities support files..." echo "A2CLOUD: Downloading and copying System Utilities support files..."
@ -1432,7 +1432,7 @@ if [[ $a2CloudDisk ]]; then
else else
echo "A2CLOUD: unar is not available; not installing System Utilities support files." echo "A2CLOUD: unar is not available; not installing System Utilities support files."
fi fi
# ProTERM # ProTERM
echo "A2CLOUD: Downloading ProTERM..." echo "A2CLOUD: Downloading ProTERM..."
wget --user-agent="Mozilla/5.0 (wget_A2CLOUD; rv:1.13.4) Gecko/20100101 Firefox/4.0.1" -qO /tmp/a2cloud-install/pt31.shk http://lostclassics.apple2.info/download/InTrec/PT31A2GM2K9.SHK wget --user-agent="Mozilla/5.0 (wget_A2CLOUD; rv:1.13.4) Gecko/20100101 Firefox/4.0.1" -qO /tmp/a2cloud-install/pt31.shk http://lostclassics.apple2.info/download/InTrec/PT31A2GM2K9.SHK
@ -1462,30 +1462,30 @@ if [[ $a2CloudDisk ]]; then
acmd -p "$a2CloudDisk" PROTERM SYS < /tmp/a2cloud-install/pt31/"PT3.SYSTEM#ff2000" acmd -p "$a2CloudDisk" PROTERM SYS < /tmp/a2cloud-install/pt31/"PT3.SYSTEM#ff2000"
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
rm -rf /tmp/a2cloud-install/pt31 rm -rf /tmp/a2cloud-install/pt31
# Z-Link # Z-Link
echo "A2CLOUD: Downloading and copying Z-Link..." echo "A2CLOUD: Downloading and copying Z-Link..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
wget -qO /tmp/a2cloud-install/zlink.shk "ftp://ftp.gno.org/pub/apple2/prodos/comm/term/zLink91.shk" wget -qO /tmp/a2cloud-install/zlink.shk "ftp://ftp.gno.org/pub/apple2/prodos/comm/term/zLink91.shk"
nulib2 -p zlink.shk z.link.system | acmd -p "$a2CloudDisk" Z.LINK SYS nulib2 -p zlink.shk z.link.system | acmd -p "$a2CloudDisk" Z.LINK SYS
# ShrinkIt # ShrinkIt
echo "A2CLOUD: Downloading and copying ShrinkIt..." echo "A2CLOUD: Downloading and copying ShrinkIt..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
wget -qO shrinkit.sdk http://web.archive.org/web/20131031160750/http://www.nulib.com/library/shrinkit.sdk wget -qO shrinkit.sdk http://web.archive.org/web/20131031160750/http://www.nulib.com/library/shrinkit.sdk
[[ ! -f shrinkit.sdk ]] && wget -qO shrinkit.sdk http://appleii.ivanx.com/a2cloud/files/shrinkit.sdk [[ ! -f shrinkit.sdk ]] && wget -qO shrinkit.sdk http://appleii.ivanx.com/a2cloud/files/shrinkit.sdk
nulib2 -xs shrinkit.sdk > /dev/null nulib2 -xs shrinkit.sdk > /dev/null
acmd -g /tmp/a2cloud-install/SHRINKIT SHRINKIT - | acmd -p "$a2CloudDisk" SHRINKIT SYS acmd -g /tmp/a2cloud-install/SHRINKIT SHRINKIT - | acmd -p "$a2CloudDisk" SHRINKIT SYS
acmd -g /tmp/a2cloud-install/SHRINKIT SHRINKIT.SYSTEM - | acmd -p "$a2CloudDisk" SHRINKIT.SYS SYS acmd -g /tmp/a2cloud-install/SHRINKIT SHRINKIT.SYSTEM - | acmd -p "$a2CloudDisk" SHRINKIT.SYS SYS
acmd -g /tmp/a2cloud-install/SHRINKIT IIPLUS.SHRINKIT - | acmd -p "$a2CloudDisk" IIPLUS.SHRINKIT SYS acmd -g /tmp/a2cloud-install/SHRINKIT IIPLUS.SHRINKIT - | acmd -p "$a2CloudDisk" IIPLUS.SHRINKIT SYS
acmd -g /tmp/a2cloud-install/SHRINKIT IIPLUS.UNSHRINK - | acmd -p "$a2CloudDisk" IIPLUS.UNSHRINK SYS acmd -g /tmp/a2cloud-install/SHRINKIT IIPLUS.UNSHRINK - | acmd -p "$a2CloudDisk" IIPLUS.UNSHRINK SYS
# DSK2FILE # DSK2FILE
echo "A2CLOUD: Downloading and copying DSK2FILE..." echo "A2CLOUD: Downloading and copying DSK2FILE..."
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
wget -q -O dsk2file.shk http://www.dwheeler.com/6502/oneelkruns/dsk2file.zip wget -q -O dsk2file.shk http://www.dwheeler.com/6502/oneelkruns/dsk2file.zip
nulib2 -p dsk2file.shk dsk2file58 | acmd -p "$a2CloudDisk" DSK2FILE SYS nulib2 -p dsk2file.shk dsk2file58 | acmd -p "$a2CloudDisk" DSK2FILE SYS
# Apple System Utilities 3.1 launch file # Apple System Utilities 3.1 launch file
if [[ -f /usr/local/bin/unar ]]; then if [[ -f /usr/local/bin/unar ]]; then
echo "A2CLOUD: Copying System Utilities launch file..." echo "A2CLOUD: Copying System Utilities launch file..."
@ -1493,18 +1493,18 @@ if [[ $a2CloudDisk ]]; then
else else
echo "A2CLOUD: unar is not available; not installing System Utilities." echo "A2CLOUD: unar is not available; not installing System Utilities."
fi fi
# Filer # Filer
echo "A2CLOUD: Downloading and copying Filer..." echo "A2CLOUD: Downloading and copying Filer..."
wget -qO /tmp/a2cloud-install/mmgr.prutil.sdk ftp://ftp.gno.org/pub/apple2/prodos/comm/term/modem.mgr/mmgr.prutil.sdk wget -qO /tmp/a2cloud-install/mmgr.prutil.sdk ftp://ftp.gno.org/pub/apple2/prodos/comm/term/modem.mgr/mmgr.prutil.sdk
cd /tmp/a2cloud-install cd /tmp/a2cloud-install
nulib2 -xs mmgr.prutil.sdk > /dev/null nulib2 -xs mmgr.prutil.sdk > /dev/null
acmd -g /tmp/a2cloud-install/MMGR FILER - | acmd -p "$a2CloudDisk" FILER SYS acmd -g /tmp/a2cloud-install/MMGR FILER - | acmd -p "$a2CloudDisk" FILER SYS
# ADTPRO launch # ADTPRO launch
echo "A2CLOUD: Copying ADTPro launch file..." echo "A2CLOUD: Copying ADTPro launch file..."
acmd -g /usr/local/adtpro/disks/ADTPRO-*DSK ADTPRO - | acmd -p "$a2CloudDisk" ADTPRO SYS acmd -g /usr/local/adtpro/disks/ADTPRO-*DSK ADTPRO - | acmd -p "$a2CloudDisk" ADTPRO SYS
# VSDRIVE # VSDRIVE
if [[ ! $(acmd -ls "$a2CloudDisk" | grep '^VSDRIVE BIN') ]]; then if [[ ! $(acmd -ls "$a2CloudDisk" | grep '^VSDRIVE BIN') ]]; then
echo "A2CLOUD: Copying VSDRIVE..." echo "A2CLOUD: Copying VSDRIVE..."
@ -1513,16 +1513,16 @@ if [[ $a2CloudDisk ]]; then
else else
echo "A2CLOUD: VSDRIVE is already on the target disk image." echo "A2CLOUD: VSDRIVE is already on the target disk image."
fi fi
fi fi
if [[ ! -f $a2CloudDisk140 || ( $(wc -c $a2CloudDisk140 | cut -f 1 -d ' ') != "143360" ) ]]; then if [[ ! -f $a2CloudDisk140 || ( $(wc -c $a2CloudDisk140 | cut -f 1 -d ' ') != "143360" ) ]]; then
echo "A2CLOUD: Creating 140K disk image..." echo "A2CLOUD: Creating 140K disk image..."
mkpo "$a2CloudDisk140" A2CLOUD mkpo "$a2CloudDisk140" A2CLOUD
dd bs=256 count=1 of="$a2CloudDisk140" conv=notrunc 2> /dev/null < /usr/local/adtpro/disks/ADTPRO-*DSK dd bs=256 count=1 of="$a2CloudDisk140" conv=notrunc 2> /dev/null < /usr/local/adtpro/disks/ADTPRO-*DSK
dd bs=256 count=1 of="$a2CloudDisk140" skip=14 seek=14 conv=notrunc 2> /dev/null < /usr/local/adtpro/disks/ADTPRO-*DSK dd bs=256 count=1 of="$a2CloudDisk140" skip=14 seek=14 conv=notrunc 2> /dev/null < /usr/local/adtpro/disks/ADTPRO-*DSK
acmd -g $a2CloudDisk BASIC.SYSTEM - | acmd -p $a2CloudDisk140 BASIC.SYSTEM SYS acmd -g $a2CloudDisk BASIC.SYSTEM - | acmd -p $a2CloudDisk140 BASIC.SYSTEM SYS
acmd -g $a2CloudDisk PRODOS - | acmd -p $a2CloudDisk140 PRODOS SYS acmd -g $a2CloudDisk PRODOS - | acmd -p $a2CloudDisk140 PRODOS SYS
acmd -g $a2CloudDisk STARTUP - | acmd -p $a2CloudDisk140 STARTUP BAS acmd -g $a2CloudDisk STARTUP - | acmd -p $a2CloudDisk140 STARTUP BAS
@ -1561,7 +1561,7 @@ if [[ $a2CloudDisk ]]; then
else else
echo "A2CLOUD: A2PI client is already on the target disk image." echo "A2CLOUD: A2PI client is already on the target disk image."
fi fi
if [[ -f /usr/local/adtpro/disks/Virtual.po && ! -L /usr/local/adtpro/disks/Virtual.po ]]; then if [[ -f /usr/local/adtpro/disks/Virtual.po && ! -L /usr/local/adtpro/disks/Virtual.po ]]; then
mv /usr/local/adtpro/disks/Virtual.po /usr/local/adtpro/disks/defaultVirtual.po &> /dev/null mv /usr/local/adtpro/disks/Virtual.po /usr/local/adtpro/disks/defaultVirtual.po &> /dev/null
vsd1 -f /usr/local/adtpro/disks/defaultVirtual.po vsd1 -f /usr/local/adtpro/disks/defaultVirtual.po
@ -1575,7 +1575,7 @@ if [[ $a2CloudDisk ]]; then
fi fi
vsd2 -f $a2CloudDisk vsd2 -f $a2CloudDisk
# for compatibility with pre-1.6.7 # for compatibility with pre-1.6.7
ln -s /usr/local/adtpro/disks/A2CLOUD.PO /usr/local/adtpro/disks/A2CLOUD.HDV ln -s /usr/local/adtpro/disks/A2CLOUD.PO /usr/local/adtpro/disks/A2CLOUD.HDV
echo echo
@ -1706,7 +1706,7 @@ fi
# √ can test if password is "raspberry" or "apple2" and advise accordingly # √ can test if password is "raspberry" or "apple2" and advise accordingly
# √ enable Uthernet by default in gsport-setup # √ enable Uthernet by default in gsport-setup
# √ enable AppleTalk Turbo by default in gsport-setup # √ enable AppleTalk Turbo by default in gsport-setup
# √ make kegs run as root # √ make kegs run as root
# √ consolidate gsport-setup and kegs-setup # √ consolidate gsport-setup and kegs-setup
# √ gsport-setup is gsport, gsport-setup -k is kegs # √ gsport-setup is gsport, gsport-setup -k is kegs
# √ clean up KEGS/GSport installer sections to be consistent # √ clean up KEGS/GSport installer sections to be consistent

View File

@ -26,7 +26,7 @@ else
term="vt100" term="vt100"
elif [[ $(tr [:upper:] [:lower:] <<< $1) == "color" ]]; then elif [[ $(tr [:upper:] [:lower:] <<< $1) == "color" ]]; then
term="pcansi" term="pcansi"
elif [[ $(tr [:upper:] [:lower:] <<< $1) == "none" ]]; then elif [[ $(tr [:upper:] [:lower:] <<< $1) == "none" ]]; then
term="dumb" term="dumb"
else else
term="$1" term="$1"

View File

@ -26,7 +26,7 @@ if [[ $(grep -e '-scanttyUSB' <<< "$*") ]]; then
# echo "scantty no devices eligible: sleeping" # echo "scantty no devices eligible: sleeping"
sleep 86399 sleep 86399
fi fi
# echo "result:$ttyUSB" # echo "result:$ttyUSB"
elif [[ $(grep -o 'ttyUSB[^ ]*' <<< "$*") ]]; then elif [[ $(grep -o 'ttyUSB[^ ]*' <<< "$*") ]]; then
# echo "device specified" # echo "device specified"