diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-26 23:56:30 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-26 23:56:30 -0200 |
commit | 6e077ce5604f8de1eec8e953248674423254246d (patch) | |
tree | 9b0cee6c0bb79ab0a956982c015fa1d422073ae9 /lib/keyringer/actions/rmdir | |
parent | 7468b6ec0df6aa6c594640154eecb02b12cca5e5 (diff) | |
download | keyringer-6e077ce5604f8de1eec8e953248674423254246d.tar.gz keyringer-6e077ce5604f8de1eec8e953248674423254246d.tar.bz2 |
Adding mv and rmdir actions
Diffstat (limited to 'lib/keyringer/actions/rmdir')
-rwxr-xr-x | lib/keyringer/actions/rmdir | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/keyringer/actions/rmdir b/lib/keyringer/actions/rmdir new file mode 100755 index 0000000..398cf11 --- /dev/null +++ b/lib/keyringer/actions/rmdir @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Remove folders. +# + +# Load functions +LIB="`dirname $0`/../functions" +source "$LIB" || exit 1 + +# Aditional parameters +CWD="`pwd`" + +# Avoid leading slash +shift +ARGS="`echo "$*" | sed -e "s|^/*||"`" + +# Run rmdir command +cd "$KEYDIR/$RELATIVE_PATH" && rmdir $ARGS +cd "$CWD" |