summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-10-08 10:43:33 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-10-08 10:43:33 +0200
commit02a89b367b7e915a8729bcf123c42546ab1d8aa4 (patch)
tree9ae3a0381cdf3a20a43ba1e8b3ce6bc2d2a6ae0b /bin
parentacc909dea1dc97b0156fc2f294ac207394015d38 (diff)
Removed mercurial support
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg24
1 files changed, 8 insertions, 16 deletions
diff --git a/bin/pkg b/bin/pkg
index c8550a4..97ae36a 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -25,7 +25,7 @@ check_installed () {
}
check_valid () {
- [[ -d $PDIR/$1/.hg || -d $PDIR/$1/.git ]] || die "Not a valid package name: '$1'\n"
+ [[ -d $PDIR/$1/.git ]] || die "Not a valid package name: '$1'\n"
}
clear_line () {
@@ -143,15 +143,11 @@ progress () {
## VCS Wrappers
vcs_to_list () {
- if [[ -d $1/.hg ]] {
- echo -n "$1 hg "
- hg -R $1 log | fgrep changeset | head -n 1 | cut -d ' ' -f 4
- } elif [[ -d $1/.git ]] {
+ if [[ -d $1/.git ]] {
echo -n "$1 git "
git --git-dir=$1/.git log | fgrep commit | head -n 1 | cut -d ' ' -f 2
} else {
- echo -n "$i plain " >> .list
- ls -ablR $i | md5sum | cut -d ' ' -f 1 >> .list
+ warn "Unsupported or no repository: $1\n"
}
}
@@ -159,28 +155,24 @@ vcs_add () {
cd $PDIR
case $(list_type $1) in
git) git clone "$PKG_ROOT/$1" ;;
- hg) hg clone "$PKG_ROOT/$1" ;;
- *) die "Cannot handle repository format '$1'\n" ;;
+ *) die "$1: Cannot handle repository format '$(list_type $1)'\n" ;;
esac
}
vcs_log () {
- [[ -d .hg ]] && {hg glog | less ; return}
- [[ -d .git ]] && {git log ; return}
+ git log
}
vcs_upgrade () {
- [[ -d .hg ]] && {hg pull --update $PKG_ROOT/$PWD:t; return}
- [[ -d .git ]] && {git pull $PKG_ROOT/$PWD:t master ; return}
+ git pull $PKG_ROOT/${PWD:t} master
}
vcs_push () {
- [[ -d .hg ]] && {hg push $PKG_ROOT/$PWD:t ; return}
- [[ -d .git ]] && {git push $PKG_ROOT/$PWD:t master; return}
+ git push $PKG_ROOT/${PWD:t} master
}
vcs_status () {
- $(list_type $1) status
+ git status
}
## List stuff