diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-12-24 18:30:53 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-12-24 18:30:53 +0100 |
commit | 4bacfc13949bc977fda8b4373906091a82a24f93 (patch) | |
tree | ca436c2f86cc8bf776a12a1e6371cd642cd9de5c | |
parent | 3722c509b43172f9d8bb90010e7a81307982c818 (diff) |
bin/pkg: Added fix_origin
todo:
- Don't break the pkg refresh progressbar
- Better integration with vcs_push / vcs_pull
-rwxr-xr-x | bin/pkg | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -331,6 +331,14 @@ function exec_hook { } } +# Set the correct origin +function fix_origin { + if ! git remote | grep -F origin &> /dev/null; then + git remote add origin $PKG_ROOT/$1 + fi + git remote update +} + # Check dependencies, conflicts etc. function check_prereqs { package=$1 @@ -544,6 +552,7 @@ function pkg_add { populate_collected $1 update_provides $1 list_update_package $1 + fix_origin $1 } function pkg_push { @@ -564,6 +573,7 @@ function pkg_push { checklinks $CL_OPTIONS populate_collected $1 update_provides $1 + fix_origin $1 } } @@ -608,6 +618,7 @@ function pkg_upgrade { populate_collected $1 update_provides $1 list_update_package $1 + fix_origin $1 fi } @@ -643,6 +654,7 @@ function pkg_refresh { checklinks $CL_OPTIONS check_prereqs $1 triggers+=$1 + fix_origin $1 } function pkg_update { |