first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / files / easy_perm.sh
1 #!/bin/bash
2 # easyperm: traverses directory trees and sets the permissions to a completely
3 # accessible value (rwxrwxrwx for directories and rw-rw-rw- for files).
4
5 declare -a args=("$@")
6
7 if [ -z "${args[*]}" ]; then
8   echo "no arguments provided."
9   exit 1;
10 fi
11
12 for (( i=0; i < ${#args[*]}; i++ )); do
13   current="${args[i]}"
14 #  echo "curr is $current"
15
16   find "$current" -type d -exec chmod 777 {} ';'
17 # >/dev/null 2>/dev/null
18   find "$current" -type f -exec chmod 666 {} ';'
19 # >/dev/null 2>/dev/null
20 done
21