Skip to content

Instantly share code, notes, and snippets.

@bulwinkel
Created January 15, 2018 03:01
Show Gist options
  • Save bulwinkel/88b1542f6910406e7e6b5303d5b34830 to your computer and use it in GitHub Desktop.
Save bulwinkel/88b1542f6910406e7e6b5303d5b34830 to your computer and use it in GitHub Desktop.
script that moved imageRes-mdpi.png into res/mdpi/imageRes.png
RESOLUTIONS=('-mdpi' '-hdpi' '-xhdpi' '-xxhdpi' '-xxxhdpi')
for res in "${RESOLUTIONS[@]}"; do
echo $res
DIR="res/drawable${res}"
mkdir -p ${DIR}
for file in $(find . -type f -iname "*${res}*"); do
echo "${file}"
mv "$file" "${DIR}/${file/${res}/}"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment