summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-04-24 23:07:17 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-04-24 23:07:17 -0400
commit1541e70ad43873b63220b690242199eb0a5f68ef (patch)
tree069be496d29b123a9d77e3ae82331d81574f845d
parentece0c6165cc38a5149e21f02df3b545ce3f30f25 (diff)
autobuild: Reset abslibre before trying to do anything.
This means that we need a lock on the git repository. Which is fine, I wasn't totally convinced that the old narrower locking was safe anyway.
-rwxr-xr-x.local/bin/autobuild.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/autobuild.sh b/.local/bin/autobuild.sh
index c5a9bad..a01c9da 100755
--- a/.local/bin/autobuild.sh
+++ b/.local/bin/autobuild.sh
@@ -47,9 +47,7 @@ main() {
check_vars libretools WORKDIR ABSLIBRERECV ABSLIBRESEND
# Lock to pevent conflicting runs ######################################
-
- mkdir -p "${WORKDIR}/lockdir"
- lock 9 "$HOME/packages/lockdir/${PWD//\//%2F}" "Waiting for previous run of %q to finish" "$0"
+ lock 9 "${WORKDIR}/autobuilder.lock" "Waiting for previous run of %q to finish" "$0"
# Option/usage parsing #################################################
@@ -77,6 +75,8 @@ main() {
# The real work begins! ################################################
# Get the ABSLibre tree
+ cd "$WORKDIR/abslibre"
+ env -i git reset --hard origin/master
gitget -f -p "$ABSLIBRESEND" checkout "$ABSLIBRERECV" "$WORKDIR/abslibre"
if ! [[ -f "${WORKDIR}/abslibre/${package}/PKGBUILD" ]]; then
die "package does not exist in abslibre.git: %s" "$package"