summaryrefslogtreecommitdiff
path: root/git-compiz
diff options
context:
space:
mode:
authoromega <marco.biasco@gmail.com>2009-04-25 22:29:15 +0200
committeromega <marco.biasco@gmail.com>2009-04-25 22:29:15 +0200
commitc64d3dd063fde12ca4e46a23f3b4d7976cd309c5 (patch)
tree345124d8c68963edd3d364cf2084cc00c73cde36 /git-compiz
parentc2edda629c1d0650815cfde200f95280d230f274 (diff)
downloadscripts-c64d3dd063fde12ca4e46a23f3b4d7976cd309c5.tar.gz
scripts-c64d3dd063fde12ca4e46a23f3b4d7976cd309c5.tar.bz2
Fixed last commit
Diffstat (limited to 'git-compiz')
-rwxr-xr-xgit-compiz29
1 files changed, 19 insertions, 10 deletions
diff --git a/git-compiz b/git-compiz
index 41f581a..06609b0 100755
--- a/git-compiz
+++ b/git-compiz
@@ -372,7 +372,12 @@ printinfo space
get_repo()
{
b=`echo $1 | sed 's/.*\///g'`
-logcmd echo ">> $b <<"
+if (echo $1 | grep -q '%writeto%'); then
+ REALNAME=`echo $1 | sed 's|.*%writeto%||'`
+else
+ REALNAME=$b
+fi
+logcmd echo ">> $REALNAME <<"
logcmd echo
test -f branches/$BRANCH || logcmd echo "${ERROR_BRANCH//%s/branches/$BRANCH}"
@@ -430,19 +435,23 @@ else
# download via wget
printinfo info "${INFO_DOWNLOAD//%s/$b}";
logcmd echo
- wget -nv $1
+ if (echo $1 | grep -q '%writeto%'); then
+ wget -O $REALNAME -nv `echo $1 | sed 's|%writeto%.*||'`
+ else
+ wget -nv $1
+ fi
# extract
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