diff options
author | Florian Pritz <bluewind@xssn.at> | 2011-05-15 13:59:16 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2011-05-15 13:59:16 +0200 |
commit | fcb85132b3bb40f054cb775cbffe0e412f064ce6 (patch) | |
tree | db40c63c042ea631a11e5c62cfb2c36ae75b1ba5 /dirsu | |
parent | 1cff155acfda9e1ca0b06653897dbb9bcde0a3dd (diff) | |
download | bin-fcb85132b3bb40f054cb775cbffe0e412f064ce6.tar.gz bin-fcb85132b3bb40f054cb775cbffe0e412f064ce6.tar.xz |
add dirsu
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'dirsu')
-rwxr-xr-x | dirsu | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +#!/bin/bash +set -e +if [[ -z $1 ]]; then + target="$PWD" +else + target="$1" +fi +user="$(stat -c %U "$target")" +cd "$target" +su "$user" -c "cd $PWD; bash" |