Created
December 12, 2014 09:12
-
-
Save legendmohe/ac75f6dedd4337fdd4c3 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
TARGET_PATH="./bin_output/" | |
SOURCE_BIN=$1 | |
echo AP bin creator... | |
echo AP binary: $SOURCE_BIN | |
if [ ! -d "$TARGET_PATH" ]; then | |
mkdir $TARGET_PATH | |
fi | |
echo extracting files... | |
TARGET_LIST=`tar xvf $SOURCE_BIN -C $TARGET_PATH` | |
echo AP bin extracted: $TARGET_LIST... | |
cd $TARGET_PATH | |
echo cd to: `pwd` | |
for item in $TARGET_LIST | |
do | |
tar cvf $item.tar $item | |
done | |
echo AP tar created! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment