This commit is contained in:
David Tomaschik
2025-04-30 13:27:20 -07:00
17 changed files with 162 additions and 15 deletions

View File

@@ -218,11 +218,11 @@ case ${TOOL} in
;;
dex2jar)
makedest_or_die
src="https://github.com/pxb1988/dex2jar/releases/download/2.0/dex-tools-2.0.zip"
src="https://github.com/pxb1988/dex2jar/releases/download/v2.4/dex-tools-v2.4.zip"
download ${src} /tmp/dex2jar.zip
tmpd=$(mktemp -d)
unzip -d "${tmpd}" /tmp/dex2jar.zip
mv "${tmpd}"/* "${DESTDIR}"
mv "${tmpd}"/dex-tools-*/* "${DESTDIR}"
rm /tmp/dex2jar.zip
rm -rf "${tmpd}"
rm "${DESTDIR}"/*.bat

37
bin/restic-backup.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
set -ue
export RESTIC_DEFAULT_BE="google"
export RESTIC_PASSWORD_FILE=${HOME}/.restic-password
case "${RESTIC_BACKEND:=${RESTIC_DEFAULT_BE}}" in
google)
export GOOGLE_PROJECT_ID=systemoverlord.com:systemoverlord
export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/.config/boto/restic-creds.json
export RESTIC_REPOSITORY="gs:systemoverlord-backups-scar-2:/"
;;
b2)
. ${HOME}/.restic-backups-scar-creds
export AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY
export RESTIC_REPOSITORY="s3:s3.us-west-004.backblazeb2.com/systemoverlord-backups-scar"
;;
*)
echo "Unknown restic backend $RESTIC_BACKEND" >&2
exit 1
;;
esac
cd ${HOME}
if [ -z "${1}" ] ; then
restic backup \
--files-from "${HOME}/.restic-backup" \
--limit-upload 5000 \
--limit-download 10000
else
restic "$@"
fi