Minor changes, mostly to documentation. Several bug fixes.
[xuni.git] / chwinmod1.sh
blobb4db45fc1bd6c6d81c13ca82be2c30d41818cc6f
1 #!/bin/sh
3 file="$1"
5 if [ -f "$file" ]; then
6 if [ -n "$(echo $file | file -f - | grep executable)" ]; then
7 echo $file: executable
8 chmod 755 "$file"
9 else
10 echo $file: normal
11 chmod 644 "$file"
13 elif [ -d "$file" ]; then
14 echo $file: directory
15 chmod 755 "$file"
16 else
17 echo $file: ignored