summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGravatar klea2026-02-14 17:16:41 +0000
committerGravatar klea2026-02-14 17:19:45 +0000
commit4e25c25f085fb994d8da494d3cbbf574f787cf78 (patch)
tree75a3de9d66dc313557d1ceff0ed1e561f67dcf40 /bin
parentgit-archive: clone ssh properly (diff)
signature
git-archive: improve error handling
Diffstat (limited to 'bin')
-rwxr-xr-xbin/git-archive9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/git-archive b/bin/git-archive
index 2cce48e..9007c77 100755
--- a/bin/git-archive
+++ b/bin/git-archive
@@ -35,15 +35,18 @@ while IFS='' read -r url; do
urlwp="$work_dir/$urlp"
{
unset HOME XDG_CONFIG_HOME SSH_ASKPASS GIT_ASKPASS
+ set +e
echo "$ git clone --mirror $url $urlp"
- USER=archiveteam-codearchiver-runner ftime git -c 'core.sshCommand=ssh -F /dev/null -o "UserKnownHostsFile /dev/null" -o "IdentitiesOnly yes" -o "StrictHostKeyChecking no"' -c 'credential.interactive=false' clone --mirror "$url" "$urlwp" || true
+ USER=archiveteam-codearchiver-runner ftime git -c 'core.sshCommand=ssh -F /dev/null -o "UserKnownHostsFile /dev/null" -o "IdentitiesOnly yes" -o "StrictHostKeyChecking no"' -c 'credential.interactive=false' clone --mirror "$url" "$urlwp"
echo "$ GIT_DIR=$urlp git bundle create $urlp.bundle --all"
- USER=archiveteam-codearchiver-runner GIT_DIR=$urlwp ftime git bundle create "$urlwp.bundle" --all || true
+ USER=archiveteam-codearchiver-runner GIT_DIR=$urlwp ftime git bundle create "$urlwp.bundle" --all
[ "$?" = "0" ] && {
echo "$ rm --recursive --force $urlp"
- USER=archiveteam-codearchiver-runner rm --recursive --force "$urlwp" || true
+ USER=archiveteam-codearchiver-runner rm --recursive --force "$urlwp"
}
+ set -e
} 2>&1 | tee "$urlwp.log"
+ sed -i $'s\1'"$work_dir"$'\1'"/archive/"$'\1g' "$urlwp.log"
zstd --rm -19 "$urlwp.log"
done