aboutsummaryrefslogtreecommitdiffstats
path: root/init-sh/file_perm.sh
blob: acce5c034c964dda4704f07a61f405d91d19ea1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

IFS="
"

echo -n "Setting files permissions : "

cat $1 | while read file owner perm; do
	if [ -a "${file}" ]; then
		if [ ${owner} != "current" ]; then
			chown ${owner} ${file}
		fi
		chmod ${perm} ${file}
	fi
done

echo "done."