summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-01-31 18:28:19 -0700
committerAdrian Thurston <thurston@colm.net>2020-01-31 18:28:19 -0700
commit88e4f9ca965e35d183a87131d792b466a1a57f89 (patch)
treec3b5b024babb6455ab71eb277e5fb23f8a46e64b
parentd17cde1b5007c74a05785cd1c0904800f3cf7619 (diff)
downloadcolm-88e4f9ca965e35d183a87131d792b466a1a57f89.tar.gz
eliminate usage of --transform from tar -cf command
Rather than using the --transform argument to tar to remove the .pack extension from the individual files when creating the tarball, simply rename the files after unpacking. The individual files will then live in the tarball with the .pack extension, but that's okay. The --transform argument is not available on osx tar.
-rw-r--r--colm/colm-wrap.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/colm/colm-wrap.sh b/colm/colm-wrap.sh
index a255f4bb..8140afca 100644
--- a/colm/colm-wrap.sh
+++ b/colm/colm-wrap.sh
@@ -56,7 +56,8 @@ fi
# Default command to colm.
if [ "${INPUT%.pack}" != "$INPUT" ]; then
- tar -xmf "$INPUT" "$OUTPUT"
+ tar -xmf "$INPUT" "$OUTPUT.pack"
+ mv $OUTPUT.pack $OUTPUT
EXIT_STATUS=$?
else
CMD=${CMD:=colm}
@@ -69,7 +70,7 @@ else
$COLM $ARGS "$INPUT"
EXIT_STATUS=$?
if [ $EXIT_STATUS = 0 ]; then
- tar --transform 's/.pack$//' -cf "$OUTPUT" $PACKS
+ tar -cf "$OUTPUT" $PACKS
fi
rm -f $PACKS
fi