Initial commit

This commit is contained in:
mustard 2025-10-20 14:01:39 +02:00
commit f924326baf

26
setup.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
set -eo pipefail
# running in guest
guest_name="$(qubesdb-read /name)"
#guest_repo_dir="$(realpath ""$@"")"
guest_repo_dir="$(dirname $(realpath ""$0""))"
echo $guest_repo_dir
pushd ${guest_repo_dir} >/dev/null
if git remote | grep -Fq 'dom0'; then
echo "(${guest_name}) remote 'dom0' already exists" >&2
else
echo "(${guest_name}) setting up remote 'dom0' to pull changes via bundle" >&2
git remote add dom0 ${guest_repo_dir}/.bundles/dom0.bundle
fi
branch=$(git branch --show-current)
echo "(${guest_name}) creating bundle for branch '${branch}'" >&2
mkdir -p .bundles
git bundle create .bundles/domu.bundle "${branch}"
popd >/dev/null