Fix pkg_update_cmd
This commit is contained in:
@@ -245,8 +245,8 @@ getLatestVersion() {
|
|||||||
|
|
||||||
# Containerized package manager
|
# Containerized package manager
|
||||||
# TODO but how to determine build distro ($BASE=buster)?
|
# TODO but how to determine build distro ($BASE=buster)?
|
||||||
installPackage --silent buildah
|
if installPackage --silent buildah &&
|
||||||
if cnt=$(buildah from debian:$BASE) &>/dev/null &&
|
cnt=$(buildah from debian:$BASE) &>/dev/null &&
|
||||||
buildah run "$cnt" -- bash -c \
|
buildah run "$cnt" -- bash -c \
|
||||||
"echo 'deb [trusted=no arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $BASE main' > /etc/apt/sources.list 2>&1" &&
|
"echo 'deb [trusted=no arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $BASE main' > /etc/apt/sources.list 2>&1" &&
|
||||||
buildah run "$cnt" -- bash -c \
|
buildah run "$cnt" -- bash -c \
|
||||||
@@ -261,7 +261,7 @@ getLatestVersion() {
|
|||||||
else
|
else
|
||||||
MCVERSION="28.0.100"
|
MCVERSION="28.0.100"
|
||||||
VERSION_SOURCE="hardcoded version"
|
VERSION_SOURCE="hardcoded version"
|
||||||
echo "Warning! Using hardcoded version number, this is probably not the latest"
|
err "Warning! Using hardcoded version number"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ addRepo() {
|
|||||||
EOF'
|
EOF'
|
||||||
elif [[ "$ID" =~ ^(debian|ubuntu|linuxmint|neon)$ ]]; then
|
elif [[ "$ID" =~ ^(debian|ubuntu|linuxmint|neon)$ ]]; then
|
||||||
# MVERSION depends on $BASE unless --mcversion is passed
|
# MVERSION depends on $BASE unless --mcversion is passed
|
||||||
installPackage wget
|
installPackage --silent wget
|
||||||
declare sources_dir="/etc/apt/sources.list.d"
|
declare sources_dir="/etc/apt/sources.list.d"
|
||||||
[[ ! -d "$sources_dir" ]] && sudo mkdir -p "$sources_dir"
|
[[ ! -d "$sources_dir" ]] && sudo mkdir -p "$sources_dir"
|
||||||
sudo bash -c "cat <<- EOF > $sources_dir/mediacenter$MVERSION.list
|
sudo bash -c "cat <<- EOF > $sources_dir/mediacenter$MVERSION.list
|
||||||
@@ -390,6 +390,7 @@ installMCFromRepo() {
|
|||||||
addRepo
|
addRepo
|
||||||
|
|
||||||
# Update package list
|
# Update package list
|
||||||
|
pkg_update_cmd="pkg_update"
|
||||||
debug "$pkg_update_cmd" || pkg_update_cmd+=" &>/dev/null"
|
debug "$pkg_update_cmd" || pkg_update_cmd+=" &>/dev/null"
|
||||||
if ! eval "$pkg_update_cmd"; then
|
if ! eval "$pkg_update_cmd"; then
|
||||||
err "Package update failed!"
|
err "Package update failed!"
|
||||||
|
|||||||
Reference in New Issue
Block a user