]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
numeric_perm: small fix
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 9 Feb 2007 21:41:27 +0000 (21:41 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 9 Feb 2007 21:41:27 +0000 (21:41 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@175 04377dda-e619-0410-9926-eae83683ac58

lib/common.sh

index ce1634b980b82f5445d07f334bdc553cb2a886d3..d0fde3c4032fbaed4a87502844343e8608c7e697 100644 (file)
@@ -378,8 +378,8 @@ function numeric_perm {
 
   # just a bit of forbidden secrets
 
-  if [ -a "$file" ]; then
-    ls -ln $file | awk '{ print $1 }' | \
+  if [ -a "$1" ]; then
+    ls -ln $1| awk '{ print $1 }' | \
     sed -e 's/^.//' -e 's/r/4/g' -e 's/w/2/g' -e 's/x/1/g' \
         -e 's/-/0/g' -e 's/\(.\)\(.\)\(.\)/\1+\2+\3/g' |   \
     fold -w5 | bc -l | xargs | sed -e 's/ //g'