Update compression patch

This commit is contained in:
Peter Robinson 2022-06-14 09:29:48 +01:00
parent 1b15a2fe2d
commit 65c68496d3

View File

@ -20,13 +20,13 @@ diff --git a/Makefile b/Makefile
index e1c362f..9a48471 100644 index e1c362f..9a48471 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -11,3 +11,7 @@ check: @@ -11,3 +11,7 @@
install: install:
mkdir -p $(DESTDIR)$(FIRMWAREDIR) install -d $(DESTDIR)$(FIRMWAREDIR)
./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR) ./copy-firmware.sh $(DESTDIR)$(FIRMWAREDIR)
+ +
+installcompress: +installcompress:
+ mkdir -p $(DESTDIR)$(FIRMWAREDIR) + install -d $(DESTDIR)$(FIRMWAREDIR)
+ ./copy-firmware.sh -C $(DESTDIR)$(FIRMWAREDIR) + ./copy-firmware.sh -C $(DESTDIR)$(FIRMWAREDIR)
diff --git a/copy-firmware.sh b/copy-firmware.sh diff --git a/copy-firmware.sh b/copy-firmware.sh
index 9b46b63..0dd2e5c 100755 index 9b46b63..0dd2e5c 100755
@ -68,11 +68,11 @@ index 9b46b63..0dd2e5c 100755
grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do grep '^File:' WHENCE | sed -e's/^File: *//g' -e's/"//g' | while read f; do
- test -f "$f" || continue - test -f "$f" || continue
- $verbose "copying file $f" - $verbose "copying file $f"
- mkdir -p $destdir/$(dirname "$f") - install -d $destdir/$(dirname "$f")
- cp -d "$f" $destdir/"$f" - cp -d "$f" $destdir/"$f"
+ test -f "$f$cmpxtn" || continue + test -f "$f$cmpxtn" || continue
+ $verbose "copying file $f$cmpxtn" + $verbose "copying file $f$cmpxtn"
+ mkdir -p $destdir/$(dirname "$f$cmpxtn") + install -d $destdir/$(dirname "$f$cmpxtn")
+ cp -d "$f$cmpxtn" $destdir/"$f$cmpxtn" + cp -d "$f$cmpxtn" $destdir/"$f$cmpxtn"
done done
@ -80,11 +80,11 @@ index 9b46b63..0dd2e5c 100755
- if test -L "$f"; then - if test -L "$f"; then
- test -f "$destdir/$f" && continue - test -f "$destdir/$f" && continue
- $verbose "copying link $f" - $verbose "copying link $f"
- mkdir -p $destdir/$(dirname "$f") - install -d $destdir/$(dirname "$f")
+ if test -L "$f$cmpxtn"; then + if test -L "$f$cmpxtn"; then
+ test -f "$destdir/$f$cmpxtn" && continue + test -f "$destdir/$f$cmpxtn" && continue
+ $verbose "copying link $f$cmpxtn" + $verbose "copying link $f$cmpxtn"
+ mkdir -p $destdir/$(dirname "$f$cmpxtn") + install -d $destdir/$(dirname "$f$cmpxtn")
cp -d "$f" $destdir/"$f" cp -d "$f" $destdir/"$f"
if test "x$d" != "x"; then if test "x$d" != "x"; then
@ -110,10 +110,10 @@ index 9b46b63..0dd2e5c 100755
fi fi
else else
- $verbose "creating link $f -> $d" - $verbose "creating link $f -> $d"
- mkdir -p $destdir/$(dirname "$f") - install -d $destdir/$(dirname "$f")
- ln -sf "$d" "$destdir/$f" - ln -sf "$d" "$destdir/$f"
+ $verbose "creating link $f$cmpxtn -> $d$cmpxtn" + $verbose "creating link $f$cmpxtn -> $d$cmpxtn"
+ mkdir -p $destdir/$(dirname "$f$cmpxtn") + install -d $destdir/$(dirname "$f$cmpxtn")
+ ln -sf "$d$cmpxtn" "$destdir/$f$cmpxtn" + ln -sf "$d$cmpxtn" "$destdir/$f$cmpxtn"
fi fi
done done