Skip to content

Instantly share code, notes, and snippets.

@juliengrimault
Created February 13, 2013 08:57
Show Gist options
  • Save juliengrimault/4943185 to your computer and use it in GitHub Desktop.
Save juliengrimault/4943185 to your computer and use it in GitHub Desktop.
#!/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