Skip to content

Instantly share code, notes, and snippets.

@RomuloVitoi
Last active December 31, 2016 19:09
Show Gist options
  • Save RomuloVitoi/022a770b35206cf6f32bc69bfb31431a to your computer and use it in GitHub Desktop.
Save RomuloVitoi/022a770b35206cf6f32bc69bfb31431a to your computer and use it in GitHub Desktop.
Android assets organizer
#!/bin/bash
mkdir drawable-xxhdpi; mkdir drawable-xhdpi; mkdir drawable-hdpi; mkdir drawable-mdpi
for file in $(find . -type f -iname '*-xxhdpi*'); do
mv "$file" "drawable-xxhdpi/${file/-xxhdpi/}"
done
for file in $(find . -type f -iname '*-xhdpi*'); do
mv "$file" "drawable-xhdpi/${file/-xhdpi/}"
done
for file in $(find . -type f -iname '*-hdpi*'); do
mv "$file" "drawable-hdpi/${file/-hdpi/}"
done
for file in $(find . -type f -iname '*-mdpi*'); do
mv "$file" "drawable-mdpi/${file/-mdpi/}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment