diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-04-07 10:25:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-04-07 10:25:03 -0300 |
commit | 5cbd294d9fb1587926119e60a00dc3e66a3c1416 (patch) | |
tree | 0b50eff2e093ce900246a8411a1fc28e3a3a5b34 /trashman | |
parent | f68b373961614900fa299e9136e693168440b1db (diff) | |
download | trashman-5cbd294d9fb1587926119e60a00dc3e66a3c1416.tar.gz trashman-5cbd294d9fb1587926119e60a00dc3e66a3c1416.tar.bz2 |
Adds hoarder for local installs
Diffstat (limited to 'trashman')
-rwxr-xr-x | trashman | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env sh # -# Provision: install stuff using scripts. +# trashman handles junky software # # Copyright (C) 2017 Silvio Rhatto - rhatto at riseup.net # @@ -27,14 +27,16 @@ CWD="`pwd`" # Set shared files location if [ -e "`dirname $(readlink -f $0)`/share/$NAME" ]; then # Development or local installation layout - SHARE="`dirname $(readlink -f $0)`/share/$NAME" + LIB="`dirname $(readlink -f $0)`/share/$NAME" + SHARE="`dirname $(readlink -f $0)`/share/$BASENAME" else # System installation layout - SHARE="`dirname $(readlink -f $0)`/../share/$NAME" + LIB="`dirname $(readlink -f $0)`/../share/$NAME" + SHARE="`dirname $(readlink -f $0)`/../share/$BASENAME" fi # Include basic functions -. $SHARE/trashman/functions || exit 1 +. $LIB/trashman/functions || exit 1 # Display usage trashman_usage() { @@ -79,7 +81,11 @@ else folder="`trashman_actions_folder $package`" # Checking for privileges - trashman_check_root $ACTION + if [ "$BASENAME" == "trashman" ]; then + trashman_check_root $ACTION + else + trashman_check_sudo + fi if [ -x "$SHARE/$package/$folder/$ACTION" ]; then if [ "$ACTION" != "check" ] && [ "$ACTION" != "test" ]; then |