aboutsummaryrefslogtreecommitdiffstats
path: root/templates/root_clone.sh
diff options
context:
space:
mode:
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