From: Silvio Rhatto Date: Mon, 30 Mar 2015 12:30:12 +0000 (-0300) Subject: Adds chownme X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=97f993676f75a65f2cde0550c540aadc5998c745;p=scripts.git Adds chownme --- diff --git a/chownme b/chownme new file mode 100755 index 0000000..d0a801d --- /dev/null +++ b/chownme @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Chown a destination to the current user. +# + +# Parameters +BASENAME="`basename $0`" +DEST="$*" +ME="$(whoami)" + +# Check +if [ -z "$1" ]; then + echo "usage: $BASENAME " + exit 1 +fi + +# Proceed +chown -R $ME. $DEST