From: Rudolf Polzer Date: Sun, 11 Mar 2012 15:38:22 +0000 (+0100) Subject: fix permissions X-Git-Tag: xonotic-v0.7.0~71 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=497ee72bcdad6d02507340f9de99bc4916a2348f;p=xonotic%2Fxonotic.git fix permissions --- diff --git a/misc/tools/zipdiff b/misc/tools/zipdiff index d0e5acfb..00af9814 100755 --- a/misc/tools/zipdiff +++ b/misc/tools/zipdiff @@ -61,6 +61,10 @@ done [ -n "$from" ] || usage [ -n "$to" ] || usage +case "$output" in '') ;; /*) ;; *) output=`pwd`/$output ;; esac +case "$from" in /*) ;; *) from=`pwd`/$from ;; esac +case "$to" in /*) ;; *) to=`pwd`/$to ;; esac + found() { type=$1 @@ -166,21 +170,13 @@ case "$output" in *) rm -f "$output" if [ -n "$result" ]; then + cd "$tempdir" echo "$result" | while IFS= read -r line; do echo >&2 "extracting $line..." dline=./$line mkdir -p "$tempdir/${dline%/*}" - unzip -p "$to" "$line" > "$tempdir/$line" # this may create an empty file - don't care, DP handles this as deletion - # FIXME permissions + unzip "$to" "$line" done - case "$output" in - /*) - ;; - *) - output=`pwd`/$output - ;; - esac - cd "$tempdir" $ziptool "$output" . cd .. fi