6 Commits

Author SHA1 Message Date
e0a8bffe5d Don't exit on package installation failure 2020-06-11 16:16:53 -04:00
1e029fd611 Update RPi OS name 2020-06-08 21:42:02 -04:00
77d55b2670 Update README 2020-06-08 21:28:34 -04:00
4efd85385e Minify functions 2020-06-08 21:22:12 -04:00
92425b1b9f Update .atom-build.yml 2020-05-10 13:12:09 -04:00
be4c74f33c Update .gitignore 2020-05-09 10:09:07 -04:00
4 changed files with 20 additions and 31 deletions

View File

@@ -3,13 +3,11 @@ name: ''
targets: targets:
# Fedora # Fedora
Run silently in Fedora: Run silently in Fedora:
cmd: 'buildWrapper podmanRunEasy -m ephemeral -i fedora:latest -n installJRMC -w {FILE_ACTIVE_PATH} --silent --mkexec --systemd {FILE_ACTIVE}' cmd: 'podmanRun -o "--rm --name=installJRMC_{FILE_ACTIVE_NAME_BASE} -v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z -w {FILE_ACTIVE_PATH} fedora:latest {FILE_ACTIVE}'
Run debug in Fedora: Run debug in Fedora:
cmd: 'buildWrapper podmanRunEasy -m ephemeral -i fedora:latest -n installJRMC -w {FILE_ACTIVE_PATH} --debug --mkexec --systemd {FILE_ACTIVE}' cmd: 'podmanRun -o "--rm --name=installJRMC_{FILE_ACTIVE_NAME_BASE} -v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z -w {FILE_ACTIVE_PATH} fedora:latest {FILE_ACTIVE} --debug'
# Ubuntu # Ubuntu
Run build silently in Ubuntu: Run rpmbuild in Ubuntu:
cmd: 'buildWrapper podmanRunEasy -m ephemeral -i ubuntu:latest -n installJRMC -w {FILE_ACTIVE_PATH} -d {FILE_ACTIVE_PATH}/RPMS --silent --mkexec {FILE_ACTIVE} --debug --build --container' cmd: 'podmanRun -o "--rm --name=installJRMC_{FILE_ACTIVE_NAME_BASE} -v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z -w {FILE_ACTIVE_PATH} ubuntu:latest {FILE_ACTIVE} --rpmbuild'
Run createrepo silently in Ubuntu: Run createrepo in Ubuntu:
cmd: 'buildWrapper podmanRunEasy -m ephemeral -i ubuntu:latest -n installJRMC -w {FILE_ACTIVE_PATH} -d {FILE_ACTIVE_PATH}/output/RPMS --silent --mkexec {FILE_ACTIVE} --debug --createrepo' cmd: 'podmanRun -o "--rm --name=installJRMC_{FILE_ACTIVE_NAME_BASE} -v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z -w {FILE_ACTIVE_PATH} ubuntu:latest {FILE_ACTIVE} --createrepo'
Run debug in Ubuntu:
cmd: 'buildWrapper podmanRunEasy -m ephemeral -i ubuntu:latest -n installJRMC -w {FILE_ACTIVE_PATH} --debug --mkexec {FILE_ACTIVE} --debug --container'

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
**/ **/
*.zip *.zip
testing.sh testing.sh
.lock
tests

0
README.md Normal file → Executable file
View File

View File

@@ -7,7 +7,7 @@ shopt -s extglob
# Run installJRMC --help to see available options # Run installJRMC --help to see available options
# #
# To-dos: # To-dos:
# 1. Raspberry Pi support -- do not own one so difficult to test # 1. Raspberry Pi OS support
# 2. Interactive installation (ncurses?) # 2. Interactive installation (ncurses?)
# #
# installJRMC can be run directly or sourced as a function (by sourcing this file) # installJRMC can be run directly or sourced as a function (by sourcing this file)
@@ -18,7 +18,7 @@ shopt -s extglob
####################################### #######################################
installJRMC() { installJRMC() {
_scriptversion="0.6" _scriptversion="0.7"
_boardurl="https://yabb.jriver.com/interact/index.php/board,64.0.html" _boardurl="https://yabb.jriver.com/interact/index.php/board,64.0.html"
_outputdir="$_basedir/output" _outputdir="$_basedir/output"
_createrepo_webroot="/srv/jriver" _createrepo_webroot="/srv/jriver"
@@ -191,20 +191,9 @@ EOF
} }
err() { err() { echo "Error: $*" >&2; }
echo "Error: $*" >&2
}
#######################################
# Call this at the beginning of every function in order to track
#######################################
debug() {
[[ -n $_debug ]] && echo "Debug: $*"
}
debug() { [[ -n $_debug ]] && echo "Debug: $*"; }
####################################### #######################################
# Prepend this to any command that you wish to execute with sudo # Prepend this to any command that you wish to execute with sudo
@@ -403,12 +392,12 @@ EOF
echo "Installing:" "${_pkg_array[@]}" echo "Installing:" "${_pkg_array[@]}"
if [[ -n $_debug ]]; then if [[ -n $_debug ]]; then
if ! _pkg_install "${_pkg_array[@]}"; then if ! _pkg_install "${_pkg_array[@]}"; then
err "Failed to install package" err "Failed to install package. Attempting to continue..."
exit 1 return 1
fi fi
elif ! _pkg_install "${_pkg_array[@]}" > /dev/null 2>&1; then elif ! _pkg_install "${_pkg_array[@]}" > /dev/null 2>&1; then
err "Failed to install package." err "Failed to install package. Attempting to continue..."
_printHelpAndExit 1 return 1
fi fi
fi fi
@@ -417,12 +406,12 @@ EOF
echo "Installing:" "${_url_pkg_array[@]}" echo "Installing:" "${_url_pkg_array[@]}"
if [[ -n $_debug ]]; then if [[ -n $_debug ]]; then
if ! _pkg_install_nogpg "${_url_pkg_array[@]}"; then if ! _pkg_install_nogpg "${_url_pkg_array[@]}"; then
err "Failed to install required package from url" err "Failed to install package. Attempting to continue..."
exit 1 return 1
fi fi
elif ! _pkg_install_nogpg "${_url_pkg_array[@]}" > /dev/null 2>&1; then elif ! _pkg_install_nogpg "${_url_pkg_array[@]}" > /dev/null 2>&1; then
err "Failed to install required package from url" err "Failed to install package. Attempting to continue..."
_printHelpAndExit 1 return 1
fi fi
fi fi
} }