diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2019-09-11 21:54:38 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2019-09-11 21:54:38 -0400 |
| commit | 142c972879f1055c7aa4844609e437aa9dd36370 (patch) | |
| tree | fc95bba4dc1f409f369507359c010f0226f9341d | |
| parent | fb8c67c4445dfd685a1a83aaf188dda6c0357b67 (diff) | |
| download | dotfiles-142c972879f1055c7aa4844609e437aa9dd36370.tar.gz dotfiles-142c972879f1055c7aa4844609e437aa9dd36370.tar.xz | |
Fix up the setperms function
| -rw-r--r-- | mkshrc | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -327,10 +327,11 @@ syschroot() { # Usage: dir_oct:file_oct path setperms() { - dir_perms=$(echo $1 | awk -F: '{print $1}') - file_perms=$(echo $1 | awk -F: '{print $2}') - find "$2" -type f -print0 | xargs -0 chmod "$file_perms" - find "$2" -type d -print0 | xargs -0 chmod "$dir_perms" + _perm="$1"; shift + dir_perms=$(echo "$_perm" | awk -F: '{print $1}') + file_perms=$(echo "$_perm" | awk -F: '{print $2}') + find "$@" -type f -print0 | xargs -0 chmod "$file_perms" + find "$@" -type d -print0 | xargs -0 chmod "$dir_perms" } set_title() { |
