Skip to content

Commit

Permalink
fix numeric comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed May 8, 2018
1 parent 52c5fdc commit 05832a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/test_fix_permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ for k in $(seq 0 9); do
[[ -n "${verbose}" ]] && echo chmod ${filePerm[$k]} Dir${k}/File${k}
chmod ${filePerm[$k]} Dir${k}/File${k}
[[ -n "${verbose}" ]] && echo fix_permissions.sh ${verbose} Dir${k}
if [[ $k >= 8 ]]; then
if (( $k >= 8 )); then
fix_permissions.sh -a ${verbose} Dir${k}
else
fix_permissions.sh ${verbose} Dir${k}
fi
[[ $(stat -c %a Dir${k}) == ${fixedDirPerm[$k]} ]] || echo "Dir${k}/ permission not set properly!"
[[ $(stat -c %G Dir${k}) == desi ]] || echo "Dir${k}/ group ID not set properly!"
if [[ $k >= 8 ]]; then
if (( k >= 8 )); then
[[ $(getfacl -c Dir${k} | grep 48) == user:48:r-x ]] || echo "Dir${k}/ ACL not set properly!"
[[ $(getfacl -c Dir${k}/File${k} | grep desi) == user:48:r-- ]] || echo "Dir${k}/File${k} ACL not set properly!"
fi
Expand Down

0 comments on commit 05832a8

Please sign in to comment.