summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@nihilus.(none)>2007-07-12 02:58:54 +0200
committerKristian Lyngstol <kristian@nihilus.(none)>2007-07-12 02:58:54 +0200
commit981869e2ea01617caebb2acd1ca35b3820075eb1 (patch)
treeaa5b00672dcbeeda3b49db2a133b1d48aa40beb2
parent0a2625a335f23a061672cee069a22a8b5c960f10 (diff)
downloadcompiz-scripts-981869e2ea01617caebb2acd1ca35b3820075eb1.tar.gz
compiz-scripts-981869e2ea01617caebb2acd1ca35b3820075eb1.tar.bz2
Add ITEMS_NON_SUDO for local install
Suitable for plugins.
-rwxr-xr-xget-git51
1 files changed, 34 insertions, 17 deletions
diff --git a/get-git b/get-git
index bb06021..53b1e68 100755
--- a/get-git
+++ b/get-git
@@ -52,6 +52,12 @@ ITEMS="$ITEMS users/kristian/compiz-scripts"
# Add aditional items here if you need them.
+######
+# Items that won't be run with sudo make install, just make install.
+# Suitable for plugins etc
+
+ITEMS_NON_SUDO="users/kristian/zoom"
+
# Repository
REPO="git://anongit.opencompositing.org/"
# For developers, you may have to add your username.
@@ -128,12 +134,15 @@ get_repo "compiz" $COMPIZ
for a in $ITEMS ; do
get_repo $a $REPO
done
+for a in $ITEMS_NON_SUDO ; do
+ get_repo $a $REPO
+done
# Builds $1 if autogen.sh exist.
function build
{
- if [ ! -f $1/autogen.sh ]; then
- echo "Don't know how to build $1 (no autogen.sh). Skipping.";
+ if [ ! -f $1/autogen.sh -a ! -f $1/Makefile ]; then
+ echo "Don't know how to build $1 (no autogen.sh or Makefile). Skipping.";
return;
fi
if [ ! -d $1 ]; then
@@ -142,16 +151,18 @@ function build
fi
OLDPWD=$PWD
cd $1
- echo "Building $1: ./autogen.sh $2"
- if [ $SUPRESS = "true" ]; then
- ./autogen.sh $2 > /dev/null
- else
- ./autogen.sh $2
- fi
- if [ $? -ne 0 ]; then
- echo "$1's autogen.sh reports errors. Bailing.";
- cd $OLDPWD
- return 1
+ if [ -f $1/autogen.sh ]; then
+ echo "Building $1: ./autogen.sh $2"
+ if [ $SUPRESS = "true" ]; then
+ ./autogen.sh $2 > /dev/null
+ else
+ ./autogen.sh $2
+ fi
+ if [ $? -ne 0 ]; then
+ echo "$1's autogen.sh reports errors. Bailing.";
+ cd $OLDPWD
+ return 1
+ fi
fi
echo "Building $1: make"
@@ -166,11 +177,11 @@ function build
return 1
fi
- echo "Building $1: sudo make install"
+ echo "Building $1: $3 make install"
if [ $SUPRESS = "true" ]; then
- sudo make install > /dev/null
+ $3 make install > /dev/null
else
- sudo make install
+ $3 make install
fi
if [ $? -ne 0 ]; then
echo "$1's sudo make install returned an error and might not work.";
@@ -181,7 +192,7 @@ function build
}
# Build compiz first, and no need to continue if it fails.
-if ! build compiz "$COMPIZARGS --prefix=$MYPREFIX"; then
+if ! build compiz "$COMPIZARGS --prefix=$MYPREFIX" "sudo"; then
echo "Failed to build compiz. No reason to continue.";
exit 2;
fi
@@ -189,7 +200,13 @@ fi
# Build everything else now.
for a in $ITEMS; do
b=`echo $a | sed 's/.*\///g'`
- if ! build $b "$GENERICARGS --prefix=$MYPREFIX"; then
+ if ! build $b "$GENERICARGS --prefix=$MYPREFIX" "sudo"; then
+ bail_ask "Failed to build $b !"
+ fi
+done
+for a in $ITEMS_NON_SUDO; do
+ b=`echo $a | sed 's/.*\///g'`
+ if ! build $b "$GENERICARGS --prefix=$MYPREFIX" ""; then
bail_ask "Failed to build $b !"
fi
done