2
0
Fork 0
main
Ducky 2023-08-22 00:46:52 +01:00
commit 22e7a43a52
2 changed files with 26 additions and 0 deletions

2
.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
*~
/.tmp

24
sh.zio.backup 100755
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
wd="$(realpath "$(dirname "$(realpath -s "$0")")/.tmp")"
git_url_prefix="https://git.zio.sh/zio/rootfs/raw/branch/main"
function fetch() {
url="$1"
output="$2"
curl -L -s -o "$output" "$url"
}
mkdir -p "$wd"
mkdir -p "$wd/helpers"
fetch "$git_url_prefix/usr/local/bin/sh.zio.backup" "$wd/backup.sh"
fetch "$git_url_prefix/usr/local/libexec/zio/helpers/bash.sh" "$wd/helpers/bash.sh"
chmod +x "$wd/backup.sh"
chmod +x "$wd/helpers/bash.sh"
export ZIO_HELPERS_DIR="$wd/helpers"
. "$wd/backup.sh" $@
rm -rf "$wd"