diff options
-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" |