Permalink
Browse files

Update, Register, Build. It's like Veni, Vidi, Vici, but with Power.

  • Loading branch information...
1 parent 46cebad commit 44c971d201f9b62102886f60b70b80e62d934e7d @timwienk committed with cpojer Feb 4, 2011
Showing with 46 additions and 11 deletions.
  1. +20 −6 build
  2. +19 −1 register
  3. +7 −4 update
View
@@ -1,6 +1,20 @@
-# There is an issue with packager and packages with the same foldern name, use a trick with a different directory
-mkdir tmp
-cd tmp
-packager build Custom-Event/* Mobile/* Class-Extras/* History/* Form-AutoGrow/* Form-Placeholder/* DynamicMatcher/* EventStack/* ScrollLoader/* Tree/* Interface/* +use-only Custom-Event Mobile Class-Extras History Form-AutoGrow Form-Placeholder DynamicMatcher EventStack ScrollLoader Tree Interface
-cd ..
-rmdir tmp
+#!/bin/bash
+
+PACKAGES='Custom-Event Mobile Class-Extras History Form-AutoGrow Form-Placeholder DynamicMatcher EventStack ScrollLoader Tree Interface'
+PACKAGER=$1
+
+if [ -z "$PACKAGER" ]; then
+ PACKAGER=$(which packager || echo './packager')
+fi
+
+if [ ! -x "$PACKAGER" ]; then
+ echo "Usage: $0 [packager]"
+ echo
+ echo 'arguments:'
+ echo ' packager Path to packager executable. If not given, it tries to find'
+ echo ' packager in your $PATH, then in your current working directory.'
+ exit 1
+fi
+
+COMPONENTS=$(echo $PACKAGES | sed "s/\([^ ]*\)/'\1\/*'/g")
+bash -c "$PACKAGER build $COMPONENTS +use-only $PACKAGES"
View
@@ -1 +1,19 @@
-find . -maxdepth 1 -type d ! -name '.' ! -name '.git' -exec ./packager register {} \;
+#!/bin/bash
+
+DIR=$(dirname "$0")
+PACKAGER=$1
+
+if [ -z "$PACKAGER" ]; then
+ PACKAGER=$(which packager || echo './packager')
+fi
+
+if [ ! -x "$PACKAGER" ]; then
+ echo "Usage: $0 [packager]"
+ echo
+ echo 'arguments:'
+ echo ' packager Path to packager executable. If not given, it tries to find'
+ echo ' packager in your $PATH, then in your current working directory.'
+ exit 1
+fi
+
+find "$DIR" -maxdepth 1 -type d ! -name "$(basename "$DIR")" ! -name '.*' -exec "$PACKAGER" register {} \;
View
@@ -1,7 +1,10 @@
+#!/bin/bash
+
+DIR=$(dirname "$0")
REMOTE=$1
-if [ -z "$REMOTE" ] ; then
- REMOTE="origin"
+
+if [ -z "$REMOTE" ]; then
+ REMOTE='origin'
fi
-git pull --rebase $REMOTE master
-git submodule update --init --recursive
+bash -c "cd '$DIR' && git pull --rebase '$REMOTE' master && git submodule update --init --recursive"

0 comments on commit 44c971d

Please sign in to comment.