dotfiles/setup_deb.sh

70 lines
2.0 KiB
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
2021-07-25 16:13:54 +00:00
ME="/home/$(whoami)"
2021-07-27 19:12:03 +00:00
CFG="${ME}/.config"
DOTFILES="${ME}/dotfiles"
BINDIR="${ME}/dotfiles/bin"
2021-07-25 16:13:54 +00:00
sudo -v
2021-07-25 16:13:54 +00:00
echo "I'm assuming you're doing a fresh install. Send a SIGTERM anytime you like."
# Set dotfiles path
DOTFILES_PATH=$(pwd)
function set_symlink () {
sudo rm $HOME/.bashrc
sudo ln -s ${DOTFILES_PATH}/bash/.bashrc $HOME/.bashrc
echo "export DOTFILES_PATH=$(pwd)" >> $HOME/.bashrc
sudo rm $HOME/.bash_logout
sudo ln -s ${DOTFILES_PATH}/bash/.bash_logout $HOME/.bash_logout
sudo rm $HOME/.profile
sudo ln -s ${DOTFILES_PATH}/bash/.profile $HOME/.profile
sudo rm $HOME/.gitconfig
sudo ln -s ${DOTFILES_PATH}/git/.gitconfig $HOME/.gitconfig
sudo rm $HOME/.czcrc
sudo ln -s ${DOTFILES_PATH}/git/.czrc $HOME/.czrc
2022-01-15 12:12:24 +00:00
sudo ln -s ${DOTFILES_PATH}/gnupg/gpg-agent.conf $HOME/.gnupg/gpg-agent.conf
}
2021-08-16 07:03:25 +00:00
sudo chmod -R 755 ./scripts
sudo chmod -R 755 ./bin
2021-08-17 05:08:52 +00:00
sudo mkdir /opt/bin
2021-08-16 07:03:25 +00:00
if [[ $(cat /etc/issue) = *"Ubuntu"* ]]; then
sudo apt update
2022-01-15 12:12:24 +00:00
sudo apt upgrade -y
2021-08-16 07:03:25 +00:00
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
2021-08-16 07:05:43 +00:00
sudo apt install -y curl wget openssl tar unzip git rlwrap ssh editorconfig gpg build-essential libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev
set_symlink
elif [[ $(cat /etc/issue) = *"Debian"* ]]; then
sudo apt-get update
2022-01-15 12:12:24 +00:00
sudo apt-get upgrade -y
2021-08-16 07:05:43 +00:00
sudo apt-get install -y curl wget openssl tar unzip rlwrap ssh editorconfig gpg build-essential libffi-dev libgdbm-dev libsqlite3-dev libssl-dev zlib1g-dev
2021-08-16 07:03:25 +00:00
sudo apt-get install -y libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext
./scripts/git.sh install
set_symlink
else
echo "you will need to install curl, wget, openssl, gpg, and other stuff yourself"
fi
2021-07-27 19:12:03 +00:00
./scripts/python.sh install
2021-07-25 16:13:54 +00:00
./scripts/node.sh install
2021-07-27 19:12:03 +00:00
./scripts/go.sh install
./scripts/julia.sh install
2022-01-15 12:12:24 +00:00
./scripts/rust.sh install
2022-01-15 12:12:24 +00:00
#./scripts/java.sh install_alt
2021-08-17 05:08:52 +00:00
./scripts/micro.sh install
2021-07-27 19:12:03 +00:00
./scripts/utils.sh install
2022-01-15 12:12:24 +00:00
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
printf "\n\nCompleted\!\nNow do:\n source ~/.bashrc\n\n"