Skip to content

Instantly share code, notes, and snippets.

@legendmohe
Created December 12, 2014 09:12
Show Gist options
  • Save legendmohe/ac75f6dedd4337fdd4c3 to your computer and use it in GitHub Desktop.
Save legendmohe/ac75f6dedd4337fdd4c3 to your computer and use it in GitHub Desktop.
#!/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