pkg.sh: Fix chown and chmod lines in generated postinst #157
1 changed files with 5 additions and 1 deletions
|
|
@ -1088,7 +1088,11 @@ cmd_milk_install_log()
|
||||||
file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'`
|
file=`echo /$file | sed 's/inst-root\///; s%^//*%/%'`
|
||||||
#echo file is now \"$file\" >&2
|
#echo file is now \"$file\" >&2
|
||||||
#echo grep \"$prefix/*$file$\" $in >&2
|
#echo grep \"$prefix/*$file$\" $in >&2
|
||||||
line=`grep $file$ $in`
|
# match the end of the log line against
|
||||||
|
# the file path literally; the line may
|
||||||
|
# carry a prefix before the path, and a
|
||||||
|
# regex grep lets dots match other lines
|
||||||
|
line=`awk -v f="$file" '{ if (substr($0, length($0) - length(f) + 1) == f) print }' $in | head -n 1`
|
||||||
perm=`milk_install_log_spec_attr 1 "$line"`
|
perm=`milk_install_log_spec_attr 1 "$line"`
|
||||||
owner=`milk_install_log_spec_attr 2 "$line"`
|
owner=`milk_install_log_spec_attr 2 "$line"`
|
||||||
group=`milk_install_log_spec_attr 3 "$line"`
|
group=`milk_install_log_spec_attr 3 "$line"`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue