Created
February 13, 2013 08:57
-
-
Save juliengrimault/4943185 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/bash | |
_base_dir="${1:-.}" | |
echo "Building assets bundle in $_base_dir" | |
_dirContentBundle="$_base_dir/*.bundle" | |
for f in $_dirContentBundle; | |
do | |
echo "removing old bundle $f" | |
rm -rf "$f" | |
done | |
_dirContent="$_base_dir/*" | |
echo $_dirContent | |
for f in $_dirContent; | |
do | |
if [ -d "$f" ]; then | |
_bundle="$f.bundle" | |
echo "creating bundle $_bundle" | |
mkdir "$_bundle" | |
cp -R "$f/" "$_bundle" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment