Created
November 9, 2016 17:47
-
-
Save Filirom1/4229180154c49ae2c66a7c91be93424b to your computer and use it in GitHub Desktop.
Script that unpack a WAR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -eq 0 ]; then | |
echo "Usage: unpackWAR war_file destination" | |
echo "Usage: curl -L war_url | unpackWAR destination" | |
elif [ "$#" -eq 1 ]; then | |
DEST=$1 | |
mkdir -p $DEST | |
cat /dev/stdin | bsdtar -xvf - -C $DEST | |
elif [ "$#" -eq 2 ]; then | |
WAR=$1 | |
DEST=$2 | |
mkdir -p $DEST | |
bsdtar -C $DEST -xvf $WAR | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment