Initial commit
This commit is contained in:
commit
f924326baf
1 changed files with 26 additions and 0 deletions
26
setup.sh
Executable file
26
setup.sh
Executable 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue