-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·53 lines (44 loc) · 1.36 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
if [ -n "$BASH_VERSION" ]; then
echo "Your shell is BASH"
elif [ -n "$ZSH_VERSION" ]; then
echo "Your shell is ZSH"
else
echo "Your current shell is not Bash or Zsh. Aborting."
exit 1
fi
mkdir -p ~/.softkiwigames
# install Rust and Cargo
if [ ! -e "/usr/bin/cargo" ] && [ ! -e "$HOME/.cargo/bin/cargo" ]; then
echo "Cargo is not installed. Installing Rust..."
# Download and run the Rust installation script
curl https://sh.rustup.rs -sSf | sh
# Add Rust binaries to PATH
if [ -d "$HOME/.cargo/bin" ]; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
echo "Rust has been installed."
else
echo "Cargo is already installed."
fi
# install Rust packages
echo "Installing cargo packages..."
cargo install git-delta eza bat hwatch
echo "Linking configuration files..."
ln -f -s "$(pwd)/aliases.sh" ~/.softkiwigames/aliases.sh
ln -f -s "$(pwd)/exports.sh" ~/.softkiwigames/exports.sh
ln -f -s "$(pwd)/rc.sh" ~/.softkiwigames/rc.sh
. ~/.softkiwigames/rc.sh
echo
echo "Manual steps (one time setup):"
echo "- add .gitconfig content to your git-delta configuration"
echo
echo " cat .gitconfig >> ~/.gitconfig"
echo
echo " now check if config was added correctly:"
echo
echo " cat ~/.gitconfig"
echo
echo "- add this to your .zshrc or .bashrc file:"
echo
echo " [ -f ~/.softkiwigames/rc.sh ] && . ~/.softkiwigames/rc.sh"
echo