Files
skel/clone.sh
David Tomaschik 746653d28d Shallow clones
2025-05-23 16:17:03 -07:00

24 lines
495 B
Bash
Executable File

#!/bin/bash
set -ue
# Script to clone and install
# Wrapped in a function to prevent incomplete execution if download is
# interrupted
function installer_main {
if ! command -v git >/dev/null 2>&1 ; then
( if [ "$EUID" != 0 ] ; then
sudo apt install -y git
else
apt install -y git
fi ) || ( echo 'Failed to install git!' >/dev/stderr; false)
fi
git clone --depth 1 https://github.com/Matir/skel.git ${HOME}/.skel
${HOME}/.skel/install.sh
}
installer_main