summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-12 23:44:06 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-12 23:44:06 +0100
commitcc432943b3de181509cd957dd0fbdb1611aa508a (patch)
tree294db344f5c198a1241bfcd04b27999d0492db26 /bin
parent9a00ba48425f2a5eb3e091eed860c9cfa32e0ed1 (diff)
pkg refresh: Forcefully fix git remote origin
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkg4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/pkg b/bin/pkg
index fdfd524..e714145 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -253,7 +253,8 @@ function vcs_status {
# Set the correct origin
function vcs_fix_origin {
- if [[ ! -r .git/remotes/origin && ! -r .git/refs/remotes/origin ]] {
+ [[ $1 == rewrite ]] && git remote rm origin
+ if [[ ! -r .git/remotes/origin && ! -r .git/refs/remotes/origin/HEAD ]] {
fgrep '[remote "origin"]' .git/config &> /dev/null ||
git remote add origin $PKG_ROOT/$1
}
@@ -694,6 +695,7 @@ function pkg_refresh {
info "Cleaning build diroctery\n"
make clean
}
+ vcs_fix_origin rewrite
global_hook $1 post-update
}