Ask to backup and reset library on --uninstall
This commit is contained in:
12
installJRMC
12
installJRMC
@@ -427,7 +427,7 @@ get_latest_mc_version() {
|
|||||||
err "Warning! Using hardcoded version number"
|
err "Warning! Using hardcoded version number"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Determined MC version $MC_VERSION from the $MC_REPO repo (via $mc_version_source)"
|
echo "Selected MC version $MC_VERSION from the $MC_REPO repo (via $mc_version_source)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# @description Installs a package using the system package manager
|
# @description Installs a package using the system package manager
|
||||||
@@ -900,7 +900,7 @@ build_rpm() {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Run rpmbuild
|
# Run rpmbuild
|
||||||
echo "Building MC $MC_VERSION RPM, this may take some time"
|
echo "Building $MC_RPM, this may take some time"
|
||||||
rpmbuild_cmd=(
|
rpmbuild_cmd=(
|
||||||
rpmbuild
|
rpmbuild
|
||||||
--define="_topdir $OUTPUT_DIR"
|
--define="_topdir $OUTPUT_DIR"
|
||||||
@@ -1642,10 +1642,14 @@ uninstall() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d $HOME/.jriver ]]; then
|
if [[ -d $HOME/.jriver ]]; then
|
||||||
echo "To reset your MC library: mv $HOME/.jriver $HOME/.jriver.bk"
|
if ask_ok "Backup and reset your MC library?"; then
|
||||||
|
execute mv "$HOME/.jriver" "$HOME/.jriver.bk"
|
||||||
|
echo "Your MC library has been backed up to $HOME/.jriver.bk and reset"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "To backup and reset your MC library: mv $HOME/.jriver $HOME/.jriver.bk"
|
||||||
echo "To remove your MC library: rm -rf $HOME/.jriver"
|
echo "To remove your MC library: rm -rf $HOME/.jriver"
|
||||||
fi
|
fi
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# @description Checks for installJRMC update and re-executes, if necessary
|
# @description Checks for installJRMC update and re-executes, if necessary
|
||||||
|
|||||||
Reference in New Issue
Block a user