Permalink
Browse files

Updated build.sh to support Safari in addition to Chrome. Now uses a …

…parameter to choose the build target.
  • Loading branch information...
1 parent bbea009 commit ddc225b1bf43639e5ebf6b77e965beaeacb2588c Will Pryor committed Jul 6, 2013
Showing with 24 additions and 6 deletions.
  1. +24 −6 build.sh
View
@@ -1,10 +1,28 @@
-echo "Build XKit for Chrome"
-rm -rf build
+#!/bin/sh
+built=false
-mkdir -p build/chrome
-cp Chrome/* build/chrome/
-cp *.js build/chrome
-cp *.css build/chrome
+if [ $1 == "chrome" ] || [ $1 == "all" ]; then
+ echo "Building XKit for Chrome"
+ rm -rf build/chrome
+ mkdir -p build/chrome
+ cp Chrome/* build/chrome/
+ cp *.js build/chrome
+ cp *.css build/chrome
+ built=true
+fi
+if [ $1 == "safari" ] || [ $1 == "all" ]; then
+ echo "Building XKit for Safari"
+ rm -rf build/XKit.safariextension
+ mkdir -p build/XKit.safariextension
+ cp Safari/* build/XKit.safariextension/
+ cp *.js build/XKit.safariextension
+ cp *.css build/XKit.safariextension
+ built=true
+fi
+if [ $built == false ]; then
+ echo "'$1' is not a valid build target."
+fi
+
# mkdir build/chrome/Extensions
# cp Extensions/* build/chrome/Extensions

0 comments on commit ddc225b

Please sign in to comment.