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