Changeset 521
- Timestamp:
- 08/02/2011 15:04:23 (10 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
abspath.in (modified) (1 diff)
-
confman.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/abspath.in
r520 r521 38 38 dir=`cd $file >/dev/null; echo \$PWD` 39 39 echo "$dir" 40 return 0 41 elif [ -d $(dirname $file) ]; then 40 else 42 41 dir=`cd $(dirname $file) >/dev/null ; echo \$PWD` 43 42 echo "$dir/$(basename "$file")" 44 return 045 else46 return 147 43 fi 48 44 } -
trunk/confman.in
r520 r521 389 389 # get the info we need. 390 390 file=`$SUDO $ABSPATH $1` 391 if [ $? -eq 1 ]; then392 filename="$(basename $1)"393 real_path="$(dirname $1)"394 imaginary_path=""395 while ! [ -d $real_path ]; do396 imaginary_path="/${real_path##*/}$imaginary_path"397 real_path="${real_path%/*}"398 done399 file="$($SUDO $ABSPATH $real_path)$imaginary_path/$filename"400 fi401 391 fi 402 392 shift … … 492 482 return 493 483 else 494 # If some of the directories containing the file don't exist, we should495 # prompt for the creation of those directories ...496 if [ -z $imaginary_path ]; then497 for directory in ${imaginary_path//\// }; do498 d_owner=$owner499 d_group=$group500 d_mode=$mode501 echo "${real_path}/${directory} does not exist; creating it."502 # Prompt for directory owner503 echo "Who should be the directory's owner? [ $d_owner ]"504 read response505 if [ ! -z $response ] ; then506 d_owner=$response507 fi508 509 # And directory's group510 echo "Who should be the directory's group? [ $d_group ]"511 read response512 if [ ! -z $response ] ; then513 d_group=$response514 fi515 516 # now, the permissions517 echo "What should the directory's permissions be? [ $d_mode ]"518 read response519 if [ ! -z $response ] ; then520 d_mode=$response521 fi522 real_path="$real_path/$directory"523 conf_mkdir $real_path $d_owner $d_group $d_mode524 done525 fi526 484 # Prompt for file owner 527 485 echo "Who should be the file's owner? [ $owner ]"
Note: See TracChangeset
for help on using the changeset viewer.
