summaryrefslogtreecommitdiff
path: root/scripts/include/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/include/common.sh')
-rw-r--r--scripts/include/common.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/include/common.sh b/scripts/include/common.sh
index 7b4b295..4431056 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -368,6 +368,19 @@ function common_update_source_all {
unset files
}
+function common_reset_source_all {
+ cd ../src/
+ check_error $?
+ files="*"
+ for package in $files
+ do
+ cd ../scripts/
+ ./resetsrc.sh $package
+ check_error $?
+ done
+ unset files
+}
+
function package_get_source {
echo "package_get_source"
run_clone "${SRCURL}"
@@ -393,6 +406,23 @@ function package_update_source {
fi
}
+function package_reset_source {
+ echo "package_reset_source"
+ cd "../src/${package}"
+ if [ -d .git ]; then
+ echo "git reset --hard HEAD"
+ git reset --hard HEAD
+ check_error $?
+ return
+ fi
+ if [ -d .hg ]; then
+ echo "hg update -C"
+ hg update -C
+ check_error $?
+ return
+ fi
+}
+
function common_clean_destination {
echo "clean ${bindir}"
rm -rf "${bindir}"