aboutsummaryrefslogtreecommitdiffstats
path: root/templates/root_clone.sh
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2026-05-13 00:13:57 +0300
committerJan Tuomi <jan@jantuomi.fi>2026-05-16 18:42:27 +0300
commitb5860daf11ac353049cb1654b9414a129e5cfb96 (patch)
tree87ed89711e4f0e85ace0a97fa123199152c67302 /templates/root_clone.sh
parent4715a28fdcd87440400d17154bfa361d99db29cc (diff)
Rework
Diffstat (limited to 'templates/root_clone.sh')
-rw-r--r--templates/root_clone.sh21
1 files changed, 0 insertions, 21 deletions
diff --git a/templates/root_clone.sh b/templates/root_clone.sh
deleted file mode 100644
index 7f92c5f..0000000
--- a/templates/root_clone.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-REPO="$1"
-TARGET="$2"
-
-set -eux
-
-# Exits with 100 if the directory was changed
-
-if [ ! -d "$TARGET" ]; then
- git clone --depth=1 --branch main --single-branch "$REPO" "$TARGET"
- exit 100
-fi
-
-cd "$TARGET"
-before=$(git rev-parse HEAD)
-git fetch --depth=1 --prune origin main
-git reset --hard origin/main
-after=$(git rev-parse HEAD)
-
-if [ "$before" != "$after" ]; then exit 100; fi