summaryrefslogtreecommitdiff
path: root/bin/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pkg')
-rwxr-xr-xbin/pkg23
1 files changed, 12 insertions, 11 deletions
diff --git a/bin/pkg b/bin/pkg
index 3815f5d..b15070a 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -248,18 +248,28 @@ function vcs_upgrade {
return 1
}
git pull $PKG_ROOT/${PWD:t} $branch
- fix_origin
+ vcs_fix_origin
}
function vcs_push {
git push $PKG_ROOT/${PWD:t} master
- fix_origin
+ vcs_fix_origin
}
function vcs_status {
git status
}
+# Set the correct origin
+function vcs_fix_origin {
+ cd $PDIR/$1
+ if ! git remote | grep -F origin &> /dev/null; then
+ git remote add origin $PKG_ROOT/$1
+ fi
+ git remote update &> /dev/null
+}
+
+
## List stuff
function list_is_installed {
@@ -382,15 +392,6 @@ function global_hook {
(( $+functions[pkg_hook_$2] )) && pkg_hook_$2 $1
}
-# Set the correct origin
-function fix_origin {
- cd $PDIR/$1
- if ! git remote | grep -F origin &> /dev/null; then
- git remote add origin $PKG_ROOT/$1
- fi
- git remote update &> /dev/null
-}
-
# Check dependencies, conflicts etc.
function check_prereqs {
package=$1