Files
Initial_linux_setup/initial_setup.sh

42 lines
1.5 KiB
Bash
Raw Normal View History

2023-11-28 14:28:36 +01:00
#!/bin/bash
2024-01-09 12:07:18 +01:00
#
2024-01-12 09:34:51 +01:00
# v1.2 - Changed an alias
2024-01-09 12:07:18 +01:00
# v1.1 - Added sudo function
2023-11-28 14:28:36 +01:00
# Install some programs
2023-11-28 14:55:19 +01:00
echo "## Installing programs"
2023-11-28 22:12:06 +01:00
sleep 1
2023-11-28 14:28:36 +01:00
sudo apt-get update
2023-11-28 14:45:02 +01:00
sudo apt-get install nala -y
2023-11-28 14:28:36 +01:00
# Switch to nala
2024-01-12 09:34:51 +01:00
sudo nala install exa fish neofetch ncdu duf tldr -y
# Update tldr
echo "## Updating tldr"
tldr -u
2023-11-28 14:28:36 +01:00
# Get some custom configs
2023-11-28 14:55:19 +01:00
echo "## Downloading configs"
sleep 1
2023-11-29 12:47:39 +01:00
wget -q -O /tmp/zx_customconfig.fish https://code.strandbo.no/morten/Initial_linux_setup/raw/branch/main/zx_customconfig.fish
2024-01-09 12:07:18 +01:00
wget -q -O /tmp/sudo.fish https://code.strandbo.no/morten/Initial_linux_setup/raw/branch/main/functions/sudo.fish
2023-11-29 12:47:39 +01:00
wget -q -O /tmp/config.conf https://code.strandbo.no/morten/Initial_linux_setup/raw/branch/main/config.conf
wget -q -O /tmp/st_combadge.ascii https://code.strandbo.no/morten/Initial_linux_setup/raw/branch/main/st_combadge.ascii
2023-11-28 14:28:36 +01:00
2023-11-28 15:23:16 +01:00
# Move them about and rub
2023-11-28 14:55:19 +01:00
echo "## Placing files and rubbing 'em"
2023-11-28 22:12:06 +01:00
# Global stuff
2023-11-28 15:33:51 +01:00
sudo /bin/cp -f /tmp/zx_customconfig.fish /etc/profile.d/02-zx_customaliases.sh
2023-11-29 12:47:39 +01:00
sudo sed -i '1,9d' /etc/profile.d/02-zx_customaliases.sh
2023-11-28 15:04:12 +01:00
sudo /bin/mv -f /tmp/zx_customconfig.fish /etc/fish/conf.d/
2024-01-12 09:34:51 +01:00
sudo /bin/mv -f /tmp/sudo.fish /etc/fish/functions/
2023-11-28 22:12:06 +01:00
sudo chown root:root /etc/fish/conf.d/zx_customconfig.fish
2023-11-29 12:24:15 +01:00
if [[ ! -d /etc/neofetch/ ]]; then
echo "## Creating neofetch config directory"
sudo mkdir -p /etc/neofetch/ascii/
fi
sudo cp /tmp/st_combadge.ascii /etc/neofetch/ascii/
sudo cp /tmp/config.conf /etc/neofetch/config.conf
echo "## Disabling default motd"
2023-11-29 12:47:39 +01:00
sudo chmod -x /etc/update-motd.d/*
2023-11-28 14:55:19 +01:00
2023-11-28 22:12:06 +01:00
echo "## All set up! Time to change shell ##"