Skip to content

Instantly share code, notes, and snippets.

@jjsahalf
Created March 29, 2017 19:12
Show Gist options
  • Save jjsahalf/0c2c6d034b96025fea69dbf7f15b8381 to your computer and use it in GitHub Desktop.
Save jjsahalf/0c2c6d034b96025fea69dbf7f15b8381 to your computer and use it in GitHub Desktop.
Parameter and String Cut
if [ "${1:(-3)}" == "dex" ]; then
./d2j-dex2jar.sh $1
if [ -f "classes-dex2jar.jar" ]; then
echo "moving classes-dex2jar.jar..."
mv ./classes-dex2jar.jar $2
fi
if [ -f "classes-error.zip" ]; then
echo "moving classes-error.zip..."
mv ./classes-error.zip $2
fi
elif [ "${1:(-3)}" == "apk" ]; then
./d2j-dex2jar.sh $1
if [ -f *"dex2jar.jar" ]; then
echo "moving dex2jar.jar..."
mv ./*dex2jar.jar $2
fi
if [ -f *"error.zip" ]; then
echo "moving error.zip..."
mv ./*error.zip $2
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment