pmt: script: some fixes
This commit is contained in:
@@ -56,7 +56,7 @@ function view_help()
|
|||||||
printc "Install, uninstall, install status checker for Partition Manager binary.\n"
|
printc "Install, uninstall, install status checker for Partition Manager binary.\n"
|
||||||
printc "Options:"
|
printc "Options:"
|
||||||
printc " install, -i [OPTS] Download and install Partition Manager."
|
printc " install, -i [OPTS] Download and install Partition Manager."
|
||||||
printc " uninstall, -u [OPTS] Uninstall Partition Manager."
|
printc " uninstall, -u Uninstall Partition Manager."
|
||||||
printc " status, -s Display install/uninstall status."
|
printc " status, -s Display install/uninstall status."
|
||||||
printc " --setup, -S Setup required packages."
|
printc " --setup, -S Setup required packages."
|
||||||
printc " --package <FILE> If you already have a debug package, make\n setup by specifying this way."
|
printc " --package <FILE> If you already have a debug package, make\n setup by specifying this way."
|
||||||
@@ -136,10 +136,10 @@ function download()
|
|||||||
|
|
||||||
print "Downloading: \`${URL}'"
|
print "Downloading: \`${URL}'"
|
||||||
|
|
||||||
curl "${URL}" -o "${LOCAL_TMPDIR}" &>/dev/null \
|
curl -L "${URL}" -o "${LOCAL_TMPDIR}/pmt-${LOCAL_ARCH}.deb" &>/dev/null \
|
||||||
|| abort "Download failed!"
|
|| abort "Download failed!"
|
||||||
|
|
||||||
chmod 777 "${LOCAL_TMPDIR}/*" \
|
chmod -R 777 "${LOCAL_TMPDIR}" \
|
||||||
|| warning "Cannot set mode '777' on installed sources."
|
|| warning "Cannot set mode '777' on installed sources."
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ function setup_packages()
|
|||||||
function install_fn()
|
function install_fn()
|
||||||
{
|
{
|
||||||
local mydir="$(pwd)"
|
local mydir="$(pwd)"
|
||||||
local bname=$(basename ${LOCAL_PACKAGE})
|
[ "${LOCAL_PACKAGE}" = "" ] || local bname=$(basename ${LOCAL_PACKAGE})
|
||||||
|
|
||||||
[ "${PACKAGE}" = 1 ] && \
|
[ "${PACKAGE}" = 1 ] && \
|
||||||
if [ ! -f "${LOCAL_PACKAGE}" ]; then
|
if [ ! -f "${LOCAL_PACKAGE}" ]; then
|
||||||
@@ -209,7 +209,7 @@ function install_fn()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print "Installing Partition Manager with APT..."
|
print "Installing Partition Manager with APT..."
|
||||||
if ! apt -y install ./pmt-${LOCAL_ARCH}.deb &>/dev/null; then
|
if ! apt -y install ./pmt-${LOCAL_ARCH}.deb; then
|
||||||
warning "Installing failed with APT. Trying installing with dpkg..."
|
warning "Installing failed with APT. Trying installing with dpkg..."
|
||||||
|
|
||||||
dpkg install pmt-${LOCAL_ARCH}.deb &>/dev/null \
|
dpkg install pmt-${LOCAL_ARCH}.deb &>/dev/null \
|
||||||
Reference in New Issue
Block a user