Automated installation now supported.
This commit is contained in:
parent
93f3ba2410
commit
5db3befb4a
3 changed files with 99 additions and 34 deletions
9
scripts/automatedTest.sh
Executable file
9
scripts/automatedTest.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
./unJoey.sh
|
||||||
|
|
||||||
|
env time ./installer.sh \
|
||||||
|
AUTOMATED \
|
||||||
|
"$(pwd)/Opus ][ The Software.iso" \
|
||||||
|
"$(pwd)/Golden Gate.msi" \
|
||||||
|
"$(pwd)/Xcode_9.4.1.xip"
|
|
@ -32,6 +32,10 @@ G_SCRIPT=
|
||||||
G_UID=$(id -ru)
|
G_UID=$(id -ru)
|
||||||
G_GID=$(id -rg)
|
G_GID=$(id -rg)
|
||||||
G_IS_INSTALLED=()
|
G_IS_INSTALLED=()
|
||||||
|
G_AUTOMATED=
|
||||||
|
G_ORCA_FILE=
|
||||||
|
G_GOLDEN_GATE_FILE=
|
||||||
|
G_XCODE_FILE=
|
||||||
G_OSX_MIN=10.6
|
G_OSX_MIN=10.6
|
||||||
G_OSX_DARWIN=17
|
G_OSX_DARWIN=17
|
||||||
G_IIGS=0
|
G_IIGS=0
|
||||||
|
@ -58,15 +62,19 @@ function buildMacOSXSDK() {
|
||||||
configWrite
|
configWrite
|
||||||
configRead
|
configRead
|
||||||
|
|
||||||
|
if [[ ! -z ${G_AUTOMATED} ]]; then
|
||||||
|
XCODE=${G_XCODE_FILE}
|
||||||
|
else
|
||||||
if [[ ! -e "${OSX}/SDK" ]]; then
|
if [[ ! -e "${OSX}/SDK" ]]; then
|
||||||
tFileBrowser XCODE "Please locate your 'XCode 9.4.1' XIP" .xip ..
|
tFileBrowser XCODE "Please locate your 'XCode 9.4.1' XIP" .xip ..
|
||||||
if [[ -z ${XCODE} || "${XCODE}" == "" ]]; then
|
if [[ -z ${XCODE} || "${XCODE}" == "" ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -d osxcross ]]; then
|
if [[ ! -d osxcross ]]; then
|
||||||
purple "Building macOS SDK - This takes FOREVER!"
|
purple "Building macOS SDK"
|
||||||
git clone https://github.com/tpoechtrager/osxcross.git
|
git clone https://github.com/tpoechtrager/osxcross.git
|
||||||
pushd osxcross &> /dev/null
|
pushd osxcross &> /dev/null
|
||||||
./tools/gen_sdk_package_pbzx.sh "${XCODE}"
|
./tools/gen_sdk_package_pbzx.sh "${XCODE}"
|
||||||
|
@ -387,17 +395,25 @@ function installIIgs() {
|
||||||
doSudo chown ${G_UID}:${G_GID} "${IIGS}/ORCA/."
|
doSudo chown ${G_UID}:${G_GID} "${IIGS}/ORCA/."
|
||||||
|
|
||||||
if [[ ! -e "${IIGS}/ORCA/Languages/cc" ]]; then
|
if [[ ! -e "${IIGS}/ORCA/Languages/cc" ]]; then
|
||||||
|
if [[ ! -z ${G_AUTOMATED} ]]; then
|
||||||
|
ORCA=${G_ORCA_FILE}
|
||||||
|
else
|
||||||
tFileBrowser ORCA "Please locate your 'OPUS ][ The Software' ISO" .iso ..
|
tFileBrowser ORCA "Please locate your 'OPUS ][ The Software' ISO" .iso ..
|
||||||
if [[ -z ${ORCA} || "${ORCA}" == "" ]]; then
|
if [[ -z ${ORCA} || "${ORCA}" == "" ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -d GoldenGate ]]; then
|
if [[ ! -d GoldenGate ]]; then
|
||||||
|
if [[ ! -z ${G_AUTOMATED} ]]; then
|
||||||
|
GGATE=${G_GOLDEN_GATE_FILE}
|
||||||
|
else
|
||||||
tFileBrowser GGATE "Please locate your 'Golden Gate' MSI" .msi ..
|
tFileBrowser GGATE "Please locate your 'Golden Gate' MSI" .msi ..
|
||||||
if [[ -z ${GGATE} || "${GGATE}" == "" ]]; then
|
if [[ -z ${GGATE} || "${GGATE}" == "" ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
purple "Building GoldenGate"
|
purple "Building GoldenGate"
|
||||||
git clone git@gitlab.com:GoldenGate/GoldenGate.git
|
git clone git@gitlab.com:GoldenGate/GoldenGate.git
|
||||||
if [ ! -d GoldenGate ]; then
|
if [ ! -d GoldenGate ]; then
|
||||||
|
@ -434,7 +450,7 @@ function installIIgs() {
|
||||||
purple "Upgrading ORCA/C"
|
purple "Upgrading ORCA/C"
|
||||||
fetchGitHubRelease RESULT byteworksinc ORCA-C 2mg
|
fetchGitHubRelease RESULT byteworksinc ORCA-C 2mg
|
||||||
#***TODO*** This fails with a mmap error sometimes - no idea why
|
#***TODO*** This fails with a mmap error sometimes - no idea why
|
||||||
"${IIGS}/opus-extractor" -v -s / ${RESULT} "${IIGS}/ORCA"
|
env "${IIGS}/opus-extractor" -v -s / ${RESULT} "${IIGS}/ORCA"
|
||||||
|
|
||||||
pushd ${GOLDEN_GATE} &> /dev/null
|
pushd ${GOLDEN_GATE} &> /dev/null
|
||||||
#find . -type d -exec chmod 755 {} \;
|
#find . -type d -exec chmod 755 {} \;
|
||||||
|
@ -753,6 +769,14 @@ function mainMenu() {
|
||||||
# 0
|
# 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ ! -z ${G_AUTOMATED} ]]; then
|
||||||
|
for (( X=0; X<=$(( ${TOTAL}-1 )); X++ )); do
|
||||||
|
CHOICE="install${ITEMS[$X]}"
|
||||||
|
echo ""
|
||||||
|
tBoldBox tCYAN "NOTE: If an error is encountered, installer will exit!"
|
||||||
|
${CHOICE}
|
||||||
|
done
|
||||||
|
else
|
||||||
while [[ "${CHOICE}" != "" ]]; do
|
while [[ "${CHOICE}" != "" ]]; do
|
||||||
MENU=()
|
MENU=()
|
||||||
for (( X=0; X<=$(( ${TOTAL}-1 )); X++ )); do
|
for (( X=0; X<=$(( ${TOTAL}-1 )); X++ )); do
|
||||||
|
@ -779,6 +803,7 @@ function mainMenu() {
|
||||||
${CHOICE}
|
${CHOICE}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -792,6 +817,7 @@ function purple() {
|
||||||
|
|
||||||
# --- START
|
# --- START
|
||||||
function start() {
|
function start() {
|
||||||
|
local DOINSTALL=0
|
||||||
|
|
||||||
# This has to exist before doSudo is called
|
# This has to exist before doSudo is called
|
||||||
mkdir -p "${G_WORK}"
|
mkdir -p "${G_WORK}"
|
||||||
|
@ -876,8 +902,14 @@ function start() {
|
||||||
wget \
|
wget \
|
||||||
xcftools \
|
xcftools \
|
||||||
xz-utils
|
xz-utils
|
||||||
|
if [[ ! -z ${G_AUTOMATED} ]]; then
|
||||||
|
DOINSTALL=1
|
||||||
|
fi
|
||||||
if [[ "${MISSING}" != "" ]]; then
|
if [[ "${MISSING}" != "" ]]; then
|
||||||
if (whiptail --title "${G_TITLE}" --yesno "Some required packages are missing.\n\nInstall them now?" 9 40); then
|
if (whiptail --title "${G_TITLE}" --yesno "Some required packages are missing.\n\nInstall them now?" 9 40); then
|
||||||
|
DOINSTALL=1
|
||||||
|
fi
|
||||||
|
if [[ "${DOINSTALL}" == "1" ]]; then
|
||||||
TEMP=" ${MISSING//[^ ]}"
|
TEMP=" ${MISSING//[^ ]}"
|
||||||
TOTAL=${#TEMP}
|
TOTAL=${#TEMP}
|
||||||
COUNT=0
|
COUNT=0
|
||||||
|
@ -929,5 +961,13 @@ if [[ "$1" == "ASKPASS" ]]; then
|
||||||
doSudoAskPass
|
doSudoAskPass
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Are we doing a totally automated install?
|
||||||
|
if [[ "$1" == "AUTOMATED" ]]; then
|
||||||
|
G_AUTOMATED=1
|
||||||
|
G_ORCA_FILE=$2
|
||||||
|
G_GOLDEN_GATE_FILE=$3
|
||||||
|
G_XCODE_FILE=$4
|
||||||
|
fi
|
||||||
|
|
||||||
# At the very end so we can stream this script from a web server.
|
# At the very end so we can stream this script from a web server.
|
||||||
start
|
start
|
||||||
|
|
16
scripts/unJoey.sh
Executable file
16
scripts/unJoey.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ -e joeyDev.sh ]]; then
|
||||||
|
source joeyDev.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -e "${JOEY}/sdks/IIgs/lastMount.cfg" ]]; then
|
||||||
|
sudo "${JOEY}/sdks/IIgs/unmountORCA.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH=${HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
|
||||||
|
export JOEY=
|
||||||
|
export JOEYPATH=
|
||||||
|
export GOLDEN_GATE=
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET=
|
||||||
|
export MACOSX_DARWIN=
|
Loading…
Add table
Reference in a new issue