Add an install.sh that attempts to determine the OS, install stow and then call my apply-dotfiles script to use stow. The old installation process that was based on nix, has been moved to nix-install.
30 lines
864 B
Bash
Executable File
30 lines
864 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
echo "Installing dotfiles..."
|
|
if [ -f /etc/os-release ]; then
|
|
echo "Idenitfying OS to install GNU stow..."
|
|
if grep -q -i debian /etc/os-release; then
|
|
echo "You've got Debian!";
|
|
sudo apt update;
|
|
sudo apt install -y stow;
|
|
elif grep -q -i rhel /etc/os-release || grep -q -i fedora /etc/os-release; then
|
|
echo "You've got RedHat (or maybe Fedora)! Which is unsupported right now sorry!";
|
|
# sudo yum install -y stow;
|
|
# sudo yum clean all;
|
|
exit 1
|
|
elif grep -q -i alpine /etc/os-release; then
|
|
echo "You've got Alpine! Which is unsupported right now sorry!";
|
|
exit 1;
|
|
# apk add --no-cache jq curl;
|
|
else
|
|
echo "ERROR: Unable to identify OS!" 1>&2;
|
|
exit 1;
|
|
fi;
|
|
else
|
|
echo "ERROR: Unable to find '/etc/os-release' information!" 1>&2;
|
|
exit 1;
|
|
fi
|
|
|
|
# Apply the dotfiles with stow
|
|
./apply-dotfiles
|