mirror of
https://github.com/RasppleII/a2cloud.git
synced 2024-12-02 21:49:20 +00:00
Make install_archive_tools behave
Now install_archive_tools creates its own temp directories for installation. Nulib2 doesn't build for me on sid/buster though, we're going to need a patch I think. We may as well patch it at that point for building libnufx as a shared lib while we're at it. I really don't want another project right now. :( This is why we don't get releases out.
This commit is contained in:
parent
1301e430ce
commit
8831ee59a4
@ -34,10 +34,14 @@ install_nulib2() {
|
|||||||
|
|
||||||
echo "A2CLOUD: Installing nulib2..."
|
echo "A2CLOUD: Installing nulib2..."
|
||||||
|
|
||||||
cd /tmp/a2cloud-install
|
local nulibWork="$(mktemp -d /tmp/nulib.XXXXXXXXXXXX)"
|
||||||
|
pushd "$nulibWork" >/dev/null
|
||||||
if [[ $downloadBinaries ]]; then
|
if [[ $downloadBinaries ]]; then
|
||||||
### ArchiveTools: Install nulib2 binaries
|
### ArchiveTools: Install nulib2 binaries
|
||||||
wget -qO- "${a2cBinaryURL}/picopkg/nulib2-${ras2_os}_${ras2_arch}.tgz" | sudo tar Pzx
|
wget -q "${a2cBinaryURL}/picopkg/nulib2-${ras2_os}_${ras2_arch}.tgz"
|
||||||
|
if [[ -f "nulib2-${ras2_os}_${ras2_arch}.tgz" ]]; then
|
||||||
|
sudo tar Pzxf "nulib2-${ras2_os}_${ras2_arch}.tgz"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! hash nulib2 2> /dev/null; then
|
if ! hash nulib2 2> /dev/null; then
|
||||||
@ -47,10 +51,7 @@ install_nulib2() {
|
|||||||
sudo apt-get -y clean
|
sudo apt-get -y clean
|
||||||
|
|
||||||
# install nulib2
|
# install nulib2
|
||||||
rm -rf nulib &> /dev/null
|
wget -O nulib.tgz http://web.archive.org/web/20131031160750/http://www.nulib.com/downloads/nulibdist.tar.gz
|
||||||
mkdir -p nulib
|
|
||||||
cd nulib
|
|
||||||
wget -qO nulib.tgz http://web.archive.org/web/20131031160750/http://www.nulib.com/downloads/nulibdist.tar.gz
|
|
||||||
tar zxf nulib.tgz
|
tar zxf nulib.tgz
|
||||||
cd nufxlib*
|
cd nufxlib*
|
||||||
./configure
|
./configure
|
||||||
@ -60,9 +61,9 @@ install_nulib2() {
|
|||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
cd /tmp/a2cloud-install
|
popd >/dev/null
|
||||||
rm -rf nulib
|
|
||||||
fi
|
fi
|
||||||
|
rm -rf "$nulibWork"
|
||||||
else
|
else
|
||||||
echo "A2CLOUD: nulib2 is already installed."
|
echo "A2CLOUD: nulib2 is already installed."
|
||||||
fi
|
fi
|
||||||
@ -75,15 +76,14 @@ install_sciibin() {
|
|||||||
|
|
||||||
sudo apt-get -y install build-essential unzip
|
sudo apt-get -y install build-essential unzip
|
||||||
sudo apt-get -y clean
|
sudo apt-get -y clean
|
||||||
rm -rf undoit &> /dev/null
|
local undoitWork="$(mktemp -d /tmp/undoit.XXXXXXXXXXXX)"
|
||||||
mkdir -p undoit
|
pushd "$undoitWork" >/dev/null
|
||||||
cd undoit
|
|
||||||
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
|
popd >/dev/null
|
||||||
rm -rf undoit
|
rm -rf "$undoitWork"
|
||||||
else
|
else
|
||||||
echo "A2CLOUD: sciibin, unblu, unbit, unexec, usq are already installed."
|
echo "A2CLOUD: sciibin, unblu, unbit, unexec, usq are already installed."
|
||||||
fi
|
fi
|
||||||
@ -92,7 +92,7 @@ install_sciibin() {
|
|||||||
install_shk2image() {
|
install_shk2image() {
|
||||||
echo "A2CLOUD: Setting up shk2image command..."
|
echo "A2CLOUD: Setting up shk2image command..."
|
||||||
### ArchiveTools: Install shk2image command
|
### ArchiveTools: Install shk2image command
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/shk2image" /usr/local/bin/shk2image
|
sudo install -o root -g root -m 755 "$a2cSource/setup/shk2image" /usr/local/bin/shk2image
|
||||||
}
|
}
|
||||||
|
|
||||||
install_unar() {
|
install_unar() {
|
||||||
@ -112,9 +112,8 @@ install_unar() {
|
|||||||
sudo apt-get -y install build-essential libgnustep-base-dev libz-dev libbz2-dev libssl-dev libicu-dev unzip
|
sudo apt-get -y install build-essential libgnustep-base-dev libz-dev libbz2-dev libssl-dev libicu-dev unzip
|
||||||
sudo apt-get clean
|
sudo apt-get clean
|
||||||
|
|
||||||
rm -rf /tmp/unar &> /dev/null
|
local unarWork="$(mktemp -d /tmp/undoit.XXXXXXXXXXXX)"
|
||||||
mkdir /tmp/unar
|
pushd "$unarWork" >/dev/null
|
||||||
cd /tmp/unar
|
|
||||||
if [[ $useExternalURL ]]; then
|
if [[ $useExternalURL ]]; then
|
||||||
wget -O unar-1.8.1.zip https://github.com/incbee/Unarchiver/archive/unar-1.8.1.zip
|
wget -O unar-1.8.1.zip https://github.com/incbee/Unarchiver/archive/unar-1.8.1.zip
|
||||||
unzip -o unar-1.8.1.zip &> /dev/null
|
unzip -o unar-1.8.1.zip &> /dev/null
|
||||||
@ -129,8 +128,8 @@ install_unar() {
|
|||||||
cd ../Extra
|
cd ../Extra
|
||||||
sudo mkdir -p /usr/local/man/man1
|
sudo mkdir -p /usr/local/man/man1
|
||||||
sudo mv lsar.1 unar.1 /usr/local/man/man1
|
sudo mv lsar.1 unar.1 /usr/local/man/man1
|
||||||
cd
|
popd >/dev/null
|
||||||
rm -rf /tmp/unar
|
rm -rf "$unarWork"
|
||||||
sudo mandb &> /dev/null
|
sudo mandb &> /dev/null
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -304,11 +304,11 @@ source /usr/local/etc/a2cloudrc
|
|||||||
# this up at some point.
|
# this up at some point.
|
||||||
echo "A2CLOUD: Setting up motd..."
|
echo "A2CLOUD: Setting up motd..."
|
||||||
if [[ $(grep Raspple /etc/motd) ]]; then
|
if [[ $(grep Raspple /etc/motd) ]]; then
|
||||||
sudo install -u root -g root -m 644 "$a2cSource/setup/motd-rasppleii.txt" /etc/motd
|
sudo install -o root -g root -m 644 "$a2cSource/setup/motd-rasppleii.txt" /etc/motd
|
||||||
elif [[ $(grep A2SERVER /etc/motd) ]]; then
|
elif [[ $(grep A2SERVER /etc/motd) ]]; then
|
||||||
sudo install -u root -g root -m 644 "$a2cSource/setup/motd-vm.txt" /etc/motd
|
sudo install -o root -g root -m 644 "$a2cSource/setup/motd-vm.txt" /etc/motd
|
||||||
else
|
else
|
||||||
sudo install -u root -g root -m 644 "$a2cSource/setup/motd.txt" /etc/motd
|
sudo install -o root -g root -m 644 "$a2cSource/setup/motd.txt" /etc/motd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if lspci 2> /dev/null | grep -q VirtualBox; then
|
if lspci 2> /dev/null | grep -q VirtualBox; then
|
||||||
@ -490,7 +490,7 @@ if [[ $installADTPro ]]; then
|
|||||||
|
|
||||||
### ADTPro: Install our modified adtpro.sh
|
### ADTPro: Install our modified adtpro.sh
|
||||||
echo "A2CLOUD: Setting up customized adtpro.sh..."
|
echo "A2CLOUD: Setting up customized adtpro.sh..."
|
||||||
sudo install -u root -g root -m 755 ${a2cSource}/setup/adtpro.sh /usr/local/bin/adtpro.sh
|
sudo install -o root -g root -m 755 ${a2cSource}/setup/adtpro.sh /usr/local/bin/adtpro.sh
|
||||||
|
|
||||||
### ADTPro: Replace A2CLOUD's disks with the ones ...
|
### ADTPro: Replace A2CLOUD's disks with the ones ...
|
||||||
### FIXME: where are these created/downloaded to move?
|
### FIXME: where are these created/downloaded to move?
|
||||||
@ -568,19 +568,19 @@ if [[ $installADTPro ]]; then
|
|||||||
|
|
||||||
### A2CLOUD: Install various shell scripts
|
### A2CLOUD: Install various shell scripts
|
||||||
echo "A2CLOUD: Setting up adtpro-start command..."
|
echo "A2CLOUD: Setting up adtpro-start command..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/adtpro-start" /usr/local/bin/adtpro-start
|
sudo install -o root -g root -m 755 "$a2cSource/setup/adtpro-start" /usr/local/bin/adtpro-start
|
||||||
|
|
||||||
echo "A2CLOUD: Setting up vsd1/vsd2 commands..."
|
echo "A2CLOUD: Setting up vsd1/vsd2 commands..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/vsd" /usr/local/bin/vsd
|
sudo install -o root -g root -m 755 "$a2cSource/setup/vsd" /usr/local/bin/vsd
|
||||||
|
|
||||||
echo "A2CLOUD: Setting up acmd command..."
|
echo "A2CLOUD: Setting up acmd command..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/acmd" /usr/local/bin/acmd
|
sudo install -o root -g root -m 755 "$a2cSource/setup/acmd" /usr/local/bin/acmd
|
||||||
|
|
||||||
echo "A2CLOUD: Setting up mkpo command..."
|
echo "A2CLOUD: Setting up mkpo command..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/mkpo" /usr/local/bin/mkpo
|
sudo install -o root -g root -m 755 "$a2cSource/setup/mkpo" /usr/local/bin/mkpo
|
||||||
|
|
||||||
echo "A2CLOUD: Setting up dos2pro command..."
|
echo "A2CLOUD: Setting up dos2pro command..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/dos2pro" /usr/local/bin/dos2pro
|
sudo install -o root -g root -m 755 "$a2cSource/setup/dos2pro" /usr/local/bin/dos2pro
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ fi
|
|||||||
|
|
||||||
### A2CLOUD: Install serial port rules/scripts
|
### A2CLOUD: Install serial port rules/scripts
|
||||||
echo "A2CLOUD: Setting up USB port serial adapter handler..."
|
echo "A2CLOUD: Setting up USB port serial adapter handler..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/ttyusbhandler" /usr/local/sbin/ttyusbhandler
|
sudo install -o root -g root -m 755 "$a2cSource/setup/ttyusbhandler" /usr/local/sbin/ttyusbhandler
|
||||||
|
|
||||||
if [[ ! -f /etc/udev/rules.d/50-usb.rules ]]; then
|
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..."
|
||||||
@ -688,14 +688,14 @@ if [[ $setupSerialPortLogin ]]; then
|
|||||||
|
|
||||||
### SerialCon: Install serial login command scripts
|
### SerialCon: Install serial login command scripts
|
||||||
echo "A2CLOUD: Setting up baud command..."
|
echo "A2CLOUD: Setting up baud command..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/baud" /usr/local/bin/baud
|
sudo install -o root -g root -m 755 "$a2cSource/setup/baud" /usr/local/bin/baud
|
||||||
|
|
||||||
echo "A2CLOUD: Setting up term command..."
|
echo "A2CLOUD: Setting up term command..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/term" /usr/local/bin/term
|
sudo install -o root -g root -m 755 "$a2cSource/setup/term" /usr/local/bin/term
|
||||||
|
|
||||||
### SerialCon: Install USB serial port login
|
### SerialCon: Install USB serial port login
|
||||||
echo "A2CLOUD: Setting up USB shell login..."
|
echo "A2CLOUD: Setting up USB shell login..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/usbgetty" /usr/local/sbin/usbgetty
|
sudo install -o root -g root -m 755 "$a2cSource/setup/usbgetty" /usr/local/sbin/usbgetty
|
||||||
if [[ -n "$isSystemd" ]]; then
|
if [[ -n "$isSystemd" ]]; then
|
||||||
# FIXME: Okay, the way we need to fix this is that we need to do the
|
# FIXME: Okay, the way we need to fix this is that we need to do the
|
||||||
# -scanttyUSB behavior and create a symlink in udev here. If we have
|
# -scanttyUSB behavior and create a symlink in udev here. If we have
|
||||||
@ -708,7 +708,7 @@ if [[ $setupSerialPortLogin ]]; then
|
|||||||
# (called by udev, as before) now restarts the service upon adapter insertion.
|
# (called by udev, as before) now restarts the service upon adapter insertion.
|
||||||
# This might not be the best way to do it, but it works for now,
|
# This might not be the best way to do it, but it works for now,
|
||||||
# apart from a 30 second delay before the getty becomes available.
|
# apart from a 30 second delay before the getty becomes available.
|
||||||
sudo install -u root -g root -m 644 "$a2cSource/setup/usbgetty-systemd.service" /etc/systemd/system/getty.target.wants/usbgetty@.service
|
sudo install -o root -g root -m 644 "$a2cSource/setup/usbgetty-systemd.service" /etc/systemd/system/getty.target.wants/usbgetty@.service
|
||||||
pwd=$PWD
|
pwd=$PWD
|
||||||
cd /etc/systemd/system/getty.target.wants
|
cd /etc/systemd/system/getty.target.wants
|
||||||
grep -o 'SYMLINK+="ttyUSB.*,' /etc/udev/rules.d/50-usb.rules | cut -d '"' -f 2 | \
|
grep -o 'SYMLINK+="ttyUSB.*,' /etc/udev/rules.d/50-usb.rules | cut -d '"' -f 2 | \
|
||||||
@ -812,7 +812,7 @@ if [[ $installCommTools ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### CommTools: Install tin + a2news script
|
### CommTools: Install tin + a2news script
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/a2news" /usr/local/bin/a2news
|
sudo install -o root -g root -m 755 "$a2cSource/setup/a2news" /usr/local/bin/a2news
|
||||||
if ! hash tin 2> /dev/null; then
|
if ! hash tin 2> /dev/null; then
|
||||||
echo "A2CLOUD: Installing a2news/tin..."
|
echo "A2CLOUD: Installing a2news/tin..."
|
||||||
sudo apt-get -y install tin
|
sudo apt-get -y install tin
|
||||||
@ -838,7 +838,7 @@ if [[ $installCommTools ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### CommTools: Install irssi + a2chat script
|
### CommTools: Install irssi + a2chat script
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/a2chat" /usr/local/bin/a2chat
|
sudo install -o root -g root -m 755 "$a2cSource/setup/a2chat" /usr/local/bin/a2chat
|
||||||
if ! hash irssi 2> /dev/null; then
|
if ! hash irssi 2> /dev/null; then
|
||||||
echo "A2CLOUD: Installing a2chat/irssi..."
|
echo "A2CLOUD: Installing a2chat/irssi..."
|
||||||
sudo apt-get -y install irssi
|
sudo apt-get -y install irssi
|
||||||
@ -1018,8 +1018,8 @@ if [[ $installEmulators ]]; then
|
|||||||
sudo chgrp gsport /usr/local/bin/gsportx
|
sudo chgrp gsport /usr/local/bin/gsportx
|
||||||
sudo chmod u+s /usr/local/bin/gsportx
|
sudo chmod u+s /usr/local/bin/gsportx
|
||||||
|
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/gsport" /usr/local/bin/gsport
|
sudo install -o root -g root -m 755 "$a2cSource/setup/gsport" /usr/local/bin/gsport
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/gsport-setup" /usr/local/bin/gsport-setup
|
sudo install -o root -g root -m 755 "$a2cSource/setup/gsport-setup" /usr/local/bin/gsport-setup
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "A2CLOUD: GSport is already installed."
|
echo "A2CLOUD: GSport is already installed."
|
||||||
@ -1054,7 +1054,7 @@ if [[ $installEmulators ]]; then
|
|||||||
echo "A2CLOUD: LinApple is already installed."
|
echo "A2CLOUD: LinApple is already installed."
|
||||||
fi
|
fi
|
||||||
echo "A2CLOUD: Updating LinApple launch file..."
|
echo "A2CLOUD: Updating LinApple launch file..."
|
||||||
sudo install -u root -g root -m 755 "$a2cSource/setup/linapple" /usr/local/bin/linapple
|
sudo install -o root -g root -m 755 "$a2cSource/setup/linapple" /usr/local/bin/linapple
|
||||||
|
|
||||||
### Emulators: Set Groups
|
### Emulators: Set Groups
|
||||||
sudo addgroup gsport &> /dev/null
|
sudo addgroup gsport &> /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user