diff options
author | Adrian Thurston <thurston@colm.net> | 2020-01-31 18:28:19 -0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2020-01-31 18:28:19 -0700 |
commit | 88e4f9ca965e35d183a87131d792b466a1a57f89 (patch) | |
tree | c3b5b024babb6455ab71eb277e5fb23f8a46e64b | |
parent | d17cde1b5007c74a05785cd1c0904800f3cf7619 (diff) | |
download | colm-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.sh | 5 |
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 |