Skip to content

Instantly share code, notes, and snippets.

@ssdev-95
Last active February 24, 2023 00:14
Show Gist options
  • Select an option

  • Save ssdev-95/934291580d2a07d3c5088d2bdb3087df to your computer and use it in GitHub Desktop.

Select an option

Save ssdev-95/934291580d2a07d3c5088d2bdb3087df to your computer and use it in GitHub Desktop.
An she'll script to automatize distro configuration

Post Install Script - For Linux systems only :D

This script is intended to run post os installation commands,

Such as for install packages, or do some configs, git and others..

Not tested on rWindows, no wanna do it, update it to handle this os if ya like.

Not all Linux distros has package managers covered by this script, sorry.

How to use:

Simply download the file install.sh, or just create one and copy it's content to it,

And place it into the root folder, aka /home or simply ~/

Then run $ chmod +x ~/install.sh to make it executable.

And finally, run:

$ ./install.sh

Example on a fresh Ubuntu installation

$ curl -o- https://gist.githubusercontent.com/xSallus/934291580d2a07d3c5088d2bdb3087df/raw/c79d8364f8e52d071c0bb4dd595c60cf39f31fcb/install.sh > post-install.sh && sudo chmod +x ./post-install.sh && sudo ./post-install.sh

{c1}
Y. _
YiL .```.
Yii; .; .;;`.
YY;ii._ .;`.;;;;;:
iiYYYYYYiiiii;;;;i` ;;::;;;;
_.;YYYYYYiiiiiiYYYii .;;. ;;;
.YYYYYYYYYYiiYYYYYYYYYYYYii'` ;;;;
.YYYYYYY$$YYiiYY$$$$iiiYYYYYY;.ii;`..
:YYY$!. TYiiYY$$$$$YYYYYYYiiYYYYiYYii.
Y$MM$: "YYYYYY$!"``"4YYYYYiiiYYYYiiYY.
`. :MM$$b.,dYY$$Yii" :' :YYYYllYiiYYYiYY
_.._ :`4MM$!YYYYYYYYYii,.__.diii$$YYYYYYYYYYY
.,._ $b`P` "4$$$$$iiiiiiii$$$$YY$$$$$$YiY;
`,.`$: :$$$$$$$$$YYYYY$$$$$$$$$YYiiYYL
"`;$$. .;PPb$`.,.``T$$YY$$$$YYYYYiiiYYU:
' ;$P$;;: ;;;;i$y$"!Y$$$b;$$$Y$YY$$YYYiiiYYiYY
$Fi$$ .. ``:iii.`-";YYYYY$$YY$$$$$YYYiiYiYYY
:Y$$rb ```` `_..;;i;YYY$YY$$$$$$$YYYYYYYYiYY:
:$$$$$i;;iiiiidYYYYYYYYYY$$$$$$YYYYYYYiiYYYY.
`$$$$$$$YYYYYYYYYYY$$$$$$YYYYYYYYiiiYYYYYY
.i!$$$$$$YYYYYYYYY$$$$$$YYY$$YYiiiiYYYYYYY
:YYiii$$$$$$$YYYYYYY$$$$YY$$$$YYiiiiiYYYYi'
# my precious needed packages
packagesNeeded='curl git libatomic1 lsb-release build-essential ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip doxygen openjdk-17-jdk'
# aliases not included
#cp ./lunex/.bash_aliases ~
# Change to match the system package manager.
#<package_manager_install_command_here> $packagesNeeded
sudo apt install $packagesNeeded
# ssh setup
DIR="~/.ssh/"
if [ ! -d "$DIR" ]; then
mkdir ~/.ssh/ ~/.config/
else
echo "Folder already exists: '$DIR'";
fi
# Uncomment if wants to configure ssh from scratch
ssh-keygen -f ~/.ssh/id_rsa
chmod 700 ~/.ssh/id_rsa
echo "HOST *" >> ~/.ssh/config
echo " AddKeysToAgent yes" >> ~/.ssh/config
echo "HOST github" >> ~/.ssh/config
echo " User git" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
cat ~/.ssh/id_rsa.pub
echo " "
echo "Copy the public key above and set it up on github settings"
# github setup
git config --global user.name <PLACE_YOURS_HERE>
git config --global user.email <PLACE_YOURS_HERE>
git config --global init.defaultBranch <WHATEVER_NAME_HERE>
# node setup
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
source ~/.bashrc
nvm install --lts
# neovim setup, if u dont wanna it, comment next lines
cd ~ &&
git clone https://github.com/neovim/neovim &&
cd neovim &&
make CMAKE_BUILD_TYPE=RelWithDebInfo &&
make install
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
# neovim folder not included
# cp -r ./nvim ~/.config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment