summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoromega <marco.biasco@gmail.com>2009-04-26 11:51:02 +0200
committeromega <marco.biasco@gmail.com>2009-04-26 11:51:02 +0200
commit5c2b4c410bb6fc06a3f069059de7a39e4a6e10a1 (patch)
tree345124d8c68963edd3d364cf2084cc00c73cde36
parent7b7a81d1ceff24ba919eb38386b28dc6308a3a1c (diff)
parent6f72fb5f0212e2bf1bf896acde41fd8adadbc0e1 (diff)
downloadscripts-5c2b4c410bb6fc06a3f069059de7a39e4a6e10a1.tar.gz
scripts-5c2b4c410bb6fc06a3f069059de7a39e4a6e10a1.tar.bz2
Merge branch 'master' of git+ssh://git.compiz-fusion.org/git/users/omega/scripts
Conflicts: git-compiz
-rwxr-xr-xgit-compiz31
1 files changed, 14 insertions, 17 deletions
diff --git a/git-compiz b/git-compiz
index 4aaa715..06609b0 100755
--- a/git-compiz
+++ b/git-compiz
@@ -371,12 +371,13 @@ printinfo space
# TODO: put the downloaded files from this function into a separate folder (git/ or something similar)
get_repo()
{
+b=`echo $1 | sed 's/.*\///g'`
if (echo $1 | grep -q '%writeto%'); then
- b=`echo $1 | sed 's|.*%writeto%||'`
+ REALNAME=`echo $1 | sed 's|.*%writeto%||'`
else
- b=`echo $1 | sed 's/.*\///g'`
+ REALNAME=$b
fi
-logcmd echo ">> $b <<"
+logcmd echo ">> $REALNAME <<"
logcmd echo
test -f branches/$BRANCH || logcmd echo "${ERROR_BRANCH//%s/branches/$BRANCH}"
@@ -435,7 +436,7 @@ else
printinfo info "${INFO_DOWNLOAD//%s/$b}";
logcmd echo
if (echo $1 | grep -q '%writeto%'); then
- wget -O $b -nv `echo $1 | sed 's|%writeto%.*||'`
+ wget -O $REALNAME -nv `echo $1 | sed 's|%writeto%.*||'`
else
wget -nv $1
fi
@@ -443,14 +444,14 @@ else
printinfo info "${INFO_EXTRACT//%s/$b}";
logcmd echo
- (echo $b | grep -qe tar.bz2 -qe tar.gz -qe zip) && \
- mkdir $b-http && cd $b-http && \
- (if (echo $b | grep -q tar.bz2); then
- logcmd tar -xjf $OLDPWD/$b
- elif (echo $b | grep -q tar.gz); then
- logcmd tar -xzf $OLDPWD/$b
- elif (echo $b | grep -q zip); then
- logcmd unzip $OLDPWD/$b
+ (echo $REALNAME | grep -qe tar.bz2 -qe tar.gz -qe zip) && \
+ mkdir $REALNAME-http && cd $REALNAME-http && \
+ (if (echo $REALNAME | grep -q tar.bz2); then
+ logcmd tar -xjf $OLDPWD/$REALNAME
+ elif (echo $REALNAME | grep -q tar.gz); then
+ logcmd tar -xzf $OLDPWD/$REALNAME
+ elif (echo $REALNAME | grep -q zip); then
+ logcmd unzip $OLDPWD/$REALNAME
fi) && \
[ -d "$(ls)" ] && export USELESSDIR=$(ls) && mv $USELESSDIR/* ./ && rmdir $USELESSDIR
@@ -795,11 +796,7 @@ fi
## Build everything else now.
for a in $BASE $EMERALD $I18N $DE $PLUGINS; do
- if (echo $a | grep -q '%writeto%'); then
- b=`echo $a | sed 's|.*%writeto%||'`
- else
- b=`echo $a | sed 's/.*\///g'`
- fi
+ b=`echo $a | sed 's/.*\///g'`
get_repo $a $REPO
if ! build_wrapper `([ -d $b ] && echo $b) || ([ -d $b-http ] && echo $b-http)` "$ARGS --prefix=$PREFIX --libdir=$PREFIX/$LIBDIR"; then
bail_ask "${ERROR_BUILD_2//%s/$b} !"