Better
This commit is contained in:
parent
d3e101e624
commit
5cac960f32
|
@ -13,9 +13,20 @@ dfp="$(realpath "$(dirname "$0")"/../..)"
|
||||||
if [[ ! -d "$dfp/.git" ]]; then
|
if [[ ! -d "$dfp/.git" ]]; then
|
||||||
echo "Not running from inside the dotfiles git repo, so we need to download it first!"
|
echo "Not running from inside the dotfiles git repo, so we need to download it first!"
|
||||||
# each os needs instructions to install git, then we can clone the repo and proceed
|
# each os needs instructions to install git, then we can clone the repo and proceed
|
||||||
|
if ! command -v git; then
|
||||||
if head /etc/os-release --lines 1 | grep 'Arch Linux' > /dev/null 2>&1; then
|
if head /etc/os-release --lines 1 | grep 'Arch Linux' > /dev/null 2>&1; then
|
||||||
|
if [[ "$EUID" -ne 0 ]]; then
|
||||||
|
if ! command -v sudo; then
|
||||||
|
echo "Error: No sudo command available to try and install 'git'"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
sudo pacman -Sy --needed git
|
sudo pacman -Sy --needed git
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
pacman -Sy --needed git
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
git clone https://git.lyte.dev/lytedev/dotfiles.git "$dfp"
|
git clone https://git.lyte.dev/lytedev/dotfiles.git "$dfp"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Reference in a new issue