aboutsummaryrefslogtreecommitdiff
path: root/chownme
blob: 4a37e90b0f1ca6193a472de98948137d4b3f397d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 <dest>"
  exit 1
fi

# Proceed
sudo chown -R $ME. "$DEST"