From 986c63e7e15edb94f668fd56fa2ec1d99f005ced Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Mon, 14 Jun 2021 18:30:36 -0500 Subject: [PATCH] Adding licensing headers and updating installer for JoeyDev. --- joeylib/build.sh | 21 +++++++++++++++++++++ scripts/build-IIgs.helper.sh | 21 +++++++++++++++++++++ scripts/build-PC.helper.sh | 21 +++++++++++++++++++++ scripts/installer.sh | 25 ++++++++++++++++++------- 4 files changed, 81 insertions(+), 7 deletions(-) diff --git a/joeylib/build.sh b/joeylib/build.sh index 430a280..58b9153 100755 --- a/joeylib/build.sh +++ b/joeylib/build.sh @@ -1,5 +1,26 @@ #!/bin/bash -e +# +# JoeyLib +# Copyright (C) 2018-2019 Scott Duensing +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. +# + # Amiga # https://github.com/bebbo/amiga-gcc # m68k-amigaos-gcc -idirafter /home/scott/joey/sdks/amiga/m68k-amigaos/sys-include/machine -c ../src/joey.c diff --git a/scripts/build-IIgs.helper.sh b/scripts/build-IIgs.helper.sh index a5729e6..6bb1ff7 100644 --- a/scripts/build-IIgs.helper.sh +++ b/scripts/build-IIgs.helper.sh @@ -1,3 +1,24 @@ +# +# JoeyLib +# Copyright (C) 2018-2019 Scott Duensing +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. +# + # --- HERE BE DRAGONS --- function buildIIgs() { diff --git a/scripts/build-PC.helper.sh b/scripts/build-PC.helper.sh index cb6bbcc..d7944b2 100644 --- a/scripts/build-PC.helper.sh +++ b/scripts/build-PC.helper.sh @@ -1,3 +1,24 @@ +# +# JoeyLib +# Copyright (C) 2018-2019 Scott Duensing +# +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. +# + # --- HERE BE DRAGONS --- TARGET=${JOEY}/builds/${PROJECT} diff --git a/scripts/installer.sh b/scripts/installer.sh index d73d9fb..4ad2c74 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -33,6 +33,7 @@ G_UID=$(id -ru) G_GID=$(id -rg) G_IS_INSTALLED=() G_AUTOMATED= +G_PASSWORD= G_ORCA_FILE= G_GOLDEN_GATE_FILE= G_XCODE_FILE= @@ -339,10 +340,17 @@ function doSudo() { local ARGS="$@" local ASK="${G_PARENT}/${G_WORK}/askPass.sh" - cat <<- ASKPASS > "${ASK}" - #!/bin/bash - "${G_PARENT}/${G_SCRIPT}" ASKPASS - ASKPASS + if [[ "${G_PASSWORD}x" == "x" ]]; then + cat <<- ASKPASS > "${ASK}" + #!/bin/bash + "${G_PARENT}/${G_SCRIPT}" ASKPASS + ASKPASS + else + cat <<- ASKPASS > "${ASK}" + #!/bin/bash + echo "${G_PASSWORD}" + ASKPASS + fi chmod +x "${ASK}" if [[ "${ARGS}x" == "x" ]]; then @@ -350,6 +358,8 @@ function doSudo() { else SUDO_ASKPASS="${ASK}" sudo -A ${ARGS} fi + + rm "${ASK}" } @@ -1064,9 +1074,10 @@ 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 + G_PASSWORD="$2" + G_ORCA_FILE="$3" + G_GOLDEN_GATE_FILE="$4" + G_XCODE_FILE="$5" fi # Don't run as root.