Allow empty --install flag, default to repo method
This commit is contained in:
11
installJRMC
11
installJRMC
@@ -21,7 +21,7 @@
|
|||||||
# shellcheck disable=SC2329
|
# shellcheck disable=SC2329
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
declare -g SCRIPT_VERSION="1.34.10"
|
declare -g SCRIPT_VERSION="1.34.11-dev"
|
||||||
declare -g MC_VERSION_HARDCODE="34.0.71" # do find all replace
|
declare -g MC_VERSION_HARDCODE="34.0.71" # do find all replace
|
||||||
declare -g MC_REPO_HARDCODE="bookworm" # should match the MC_VERSION_HARDCODE
|
declare -g MC_REPO_HARDCODE="bookworm" # should match the MC_VERSION_HARDCODE
|
||||||
declare -g BOARD_ID="89.0" # MC34 board ID for automatic version detection
|
declare -g BOARD_ID="89.0" # MC34 board ID for automatic version detection
|
||||||
@@ -139,7 +139,7 @@ parse_input() {
|
|||||||
--install|-i) shift;
|
--install|-i) shift;
|
||||||
case $1 in
|
case $1 in
|
||||||
local|rpm|deb) BUILD_SWITCH=1 LOCAL_INSTALL_SWITCH=1 ;;
|
local|rpm|deb) BUILD_SWITCH=1 LOCAL_INSTALL_SWITCH=1 ;;
|
||||||
repo|remote) REPO_INSTALL_SWITCH=1 ;;
|
repo|remote|""|-*) REPO_INSTALL_SWITCH=1 ;;
|
||||||
container) CONTAINER_INSTALL_SWITCH=1 ;;
|
container) CONTAINER_INSTALL_SWITCH=1 ;;
|
||||||
snap) SNAP_INSTALL_SWITCH=1 ;;
|
snap) SNAP_INSTALL_SWITCH=1 ;;
|
||||||
appimage) APPIMAGE_INSTALL_SWITCH=1 ;;
|
appimage) APPIMAGE_INSTALL_SWITCH=1 ;;
|
||||||
@@ -173,7 +173,7 @@ parse_input() {
|
|||||||
23) MC_VERSION_USER="${MC_VERSION_USER:-23.0.104}" MC_REPO_HARDCODE="jessie" BOARD_ID="54.0" ;;
|
23) MC_VERSION_USER="${MC_VERSION_USER:-23.0.104}" MC_REPO_HARDCODE="jessie" BOARD_ID="54.0" ;;
|
||||||
22) MC_VERSION_USER="${MC_VERSION_USER:-22.0.102}" MC_REPO_HARDCODE="jessie" BOARD_ID="51.0" ;;
|
22) MC_VERSION_USER="${MC_VERSION_USER:-22.0.102}" MC_REPO_HARDCODE="jessie" BOARD_ID="51.0" ;;
|
||||||
21) MC_VERSION_USER="${MC_VERSION_USER:-21.0.90}" MC_REPO_HARDCODE="jessie" BOARD_ID="44.0" ;;
|
21) MC_VERSION_USER="${MC_VERSION_USER:-21.0.90}" MC_REPO_HARDCODE="jessie" BOARD_ID="44.0" ;;
|
||||||
20) MC_VERSION_USER="${MC_VERSION_USER:-20.0.131}" MC_REPO_HARDCODE="jessie" BOARD_ID="35.0";;
|
20) MC_VERSION_USER="${MC_VERSION_USER:-20.0.131}" MC_REPO_HARDCODE="jessie" BOARD_ID="35.0" ;;
|
||||||
*) err "Bad --mcversion"; print_help; exit 1 ;;
|
*) err "Bad --mcversion"; print_help; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
@@ -934,8 +934,7 @@ translate_packages() {
|
|||||||
recommends_arr=('mesa-libgl' 'nvidia-libgl' 'nvidia-utils' 'vulkan-intel'
|
recommends_arr=('mesa-libgl' 'nvidia-libgl' 'nvidia-utils' 'vulkan-intel'
|
||||||
'vulkan-radeon' 'vorbis-tools' 'musepack-tools')
|
'vulkan-radeon' 'vorbis-tools' 'musepack-tools')
|
||||||
;;
|
;;
|
||||||
*)
|
*) echo "Skipping package translations for $ID" ;;
|
||||||
echo "Skipping package translations for $ID"
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,6 +1036,8 @@ build_rpm() {
|
|||||||
-bb
|
-bb
|
||||||
"$spec_file"
|
"$spec_file"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Run rpmbuild and verify output RPM exists
|
||||||
execute "${rpmbuild_cmd[@]}" && [[ -f $MC_RPM ]]
|
execute "${rpmbuild_cmd[@]}" && [[ -f $MC_RPM ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user