mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-07-15 03:56:54 +00:00
Update uupdump_creator.sh
This commit is contained in:
parent
e36bc8bab2
commit
8635e2cf67
@ -80,6 +80,7 @@ function run_uupdump_creator() {
|
|||||||
apt-get update -qq >/dev/null 2>&1
|
apt-get update -qq >/dev/null 2>&1
|
||||||
if ! apt-get install -y "${MISSING[@]}" >/dev/null 2>&1; then
|
if ! apt-get install -y "${MISSING[@]}" >/dev/null 2>&1; then
|
||||||
msg_error "$(translate "Failed to install: ${MISSING[*]}")"
|
msg_error "$(translate "Failed to install: ${MISSING[*]}")"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -96,13 +97,16 @@ function run_uupdump_creator() {
|
|||||||
else
|
else
|
||||||
show_proxmenux_logo
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "Missing commands after installation: ${FAILED[*]}")"
|
msg_error "$(translate "Missing commands after installation: ${FAILED[*]}")"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
ISO_DIR=$(detect_iso_dir)
|
ISO_DIR=$(detect_iso_dir)
|
||||||
if [[ -z "$ISO_DIR" ]]; then
|
if [[ -z "$ISO_DIR" ]]; then
|
||||||
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "Could not determine a valid ISO storage directory.")"
|
msg_error "$(translate "Could not determine a valid ISO storage directory.")"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -124,12 +128,16 @@ BASE_CLEAN="$(echo "$BASE_INPUT" | sed 's:[[:space:]]*$::' | sed 's:/*$::')"
|
|||||||
|
|
||||||
if [[ ! -d "$BASE_CLEAN" ]]; then
|
if [[ ! -d "$BASE_CLEAN" ]]; then
|
||||||
if ! mkdir -p "$BASE_CLEAN"; then
|
if ! mkdir -p "$BASE_CLEAN"; then
|
||||||
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "The selected base folder does not exist and could not be created:") $BASE_CLEAN"
|
msg_error "$(translate "The selected base folder does not exist and could not be created:") $BASE_CLEAN"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ ! -w "$BASE_CLEAN" ]]; then
|
if [[ ! -w "$BASE_CLEAN" ]]; then
|
||||||
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "No write permissions on:") $BASE_CLEAN"
|
msg_error "$(translate "No write permissions on:") $BASE_CLEAN"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -138,12 +146,16 @@ TMP_DIR="$BASE_CLEAN/uup-temp"
|
|||||||
CONVERTER="$BASE_CLEAN/uup-converter"
|
CONVERTER="$BASE_CLEAN/uup-converter"
|
||||||
|
|
||||||
if ! mkdir -p "$TMP_DIR"; then
|
if ! mkdir -p "$TMP_DIR"; then
|
||||||
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "Could not create temporary directory:") $TMP_DIR"
|
msg_error "$(translate "Could not create temporary directory:") $TMP_DIR"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! mkdir -p "$CONVERTER"; then
|
if ! mkdir -p "$CONVERTER"; then
|
||||||
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "Could not create converter directory:") $CONVERTER"
|
msg_error "$(translate "Could not create converter directory:") $CONVERTER"
|
||||||
|
sleep 2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -153,11 +165,12 @@ cd "$TMP_DIR" || { msg_error "$(translate "Failed to access:") $TMP_DIR"; exit 1
|
|||||||
|
|
||||||
UUP_URL=$(whiptail --inputbox "$(translate "Paste the UUP Dump URL here")" 10 90 3>&1 1>&2 2>&3)
|
UUP_URL=$(whiptail --inputbox "$(translate "Paste the UUP Dump URL here")" 10 90 3>&1 1>&2 2>&3)
|
||||||
if [[ $? -ne 0 || -z "$UUP_URL" ]]; then
|
if [[ $? -ne 0 || -z "$UUP_URL" ]]; then
|
||||||
msg_warn "$(translate "Cancelled by user or empty URL.")"
|
#msg_warn "$(translate "Cancelled by user or empty URL.")"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! "$UUP_URL" =~ id=.+\&pack=.+\&edition=.+ ]]; then
|
if [[ ! "$UUP_URL" =~ id=.+\&pack=.+\&edition=.+ ]]; then
|
||||||
|
show_proxmenux_logo
|
||||||
msg_error "$(translate "The URL does not contain the required parameters (id, pack, edition).")"
|
msg_error "$(translate "The URL does not contain the required parameters (id, pack, edition).")"
|
||||||
sleep 2
|
sleep 2
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user