commit 56ed33c8f7a8a6ade18fcb39cc742c944bc9c22b Author: araison Date: Sun Jan 21 18:22:26 2024 +0100 Initial commit diff --git a/setup/.DS_Store b/setup/.DS_Store new file mode 100644 index 0000000..3eeed3f Binary files /dev/null and b/setup/.DS_Store differ diff --git a/setup/install.sh b/setup/install.sh new file mode 100644 index 0000000..adaa532 --- /dev/null +++ b/setup/install.sh @@ -0,0 +1,50 @@ +unameOut="$(uname -s)" +case "${unameOut}" in + Linux*) + machine=Linux;; + Darwin*) + machine=Mac;; + CYGWIN*) + machine=Cygwin;; + MINGW*) + machine=MinGw;; + MSYS_NT*) + machine=Git;; + *) + machine="UNKNOWN:${unameOut}" +esac + +if [ "$machine" = "Mac" ] +then + pkg_manager = 'brew' + echo "Installing brew package manager" + bash realpath program/package_manager/brew/install_brew.sh +fi + +if [ "$machine" = "Linux" ] +then + pkg_manager = 'apt' +fi + + +echo "Installing ${pkg_manager} packages" +bash realpath program/package_manager/${pkg_manager}/packages.sh +if [ -f realpath program/package_manager/${pkg_manager}/others ] +then +for file in $(program/package_manager/${pkg_manager}/others/*.sh) +do + bash ${file} +done +fi + +echo "Installing side packages" +for file in $(realpath others/**/*.sh) +do + bash ${file} +done +echo "Installing dotfiles" +for file in $(realpath dotfiles/**/*.sh) +do + bash ${file} +done + diff --git a/setup/programs/.DS_Store b/setup/programs/.DS_Store new file mode 100644 index 0000000..cf6e028 Binary files /dev/null and b/setup/programs/.DS_Store differ diff --git a/setup/programs/dotfiles/packages.sh b/setup/programs/dotfiles/packages.sh new file mode 100644 index 0000000..d7d4b4a --- /dev/null +++ b/setup/programs/dotfiles/packages.sh @@ -0,0 +1,7 @@ +echo "Clonning dotfiles repo : make sure you have set up your ssh keys !!" +git clone git@gitlab.xlim.fr:araison/dotfiles.git $HOME/ + +for conf in $(ls ./dotfiles) +do + stow ${conf} +done diff --git a/setup/programs/others/nerd-font.sh b/setup/programs/others/nerd-font.sh new file mode 100644 index 0000000..b912cca --- /dev/null +++ b/setup/programs/others/nerd-font.sh @@ -0,0 +1,2 @@ +brew tap homebrew/cask-fonts +brew install font-hack-nerd-font diff --git a/setup/programs/others/oh-my-zsh.sh b/setup/programs/others/oh-my-zsh.sh new file mode 100644 index 0000000..a4759a8 --- /dev/null +++ b/setup/programs/others/oh-my-zsh.sh @@ -0,0 +1 @@ +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" diff --git a/setup/programs/others/powerlevel10k.sh b/setup/programs/others/powerlevel10k.sh new file mode 100644 index 0000000..fbd9cca --- /dev/null +++ b/setup/programs/others/powerlevel10k.sh @@ -0,0 +1 @@ +git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k diff --git a/setup/programs/others/python3-libs/packages.sh b/setup/programs/others/python3-libs/packages.sh new file mode 100644 index 0000000..b5089e8 --- /dev/null +++ b/setup/programs/others/python3-libs/packages.sh @@ -0,0 +1,10 @@ +echo "Upgrading python3-pip" +python3 -m pip install --upgrade pip + +function install { + echo "Installing: ${1}..." + pip3 install ${1} +} + + +python_packages = (numpy matplotlib scipy seaborn django torch torchvision torchaudio networkx Faker torch-cluster torch-geometric torch-scatter torch-sparse torch-spline-conv tqdm yapf yt-dlp scikit-learn scikit-image pandas) diff --git a/setup/programs/others/zsh-plugins.sh b/setup/programs/others/zsh-plugins.sh new file mode 100644 index 0000000..d4cbd48 --- /dev/null +++ b/setup/programs/others/zsh-plugins.sh @@ -0,0 +1,4 @@ +echo "Installing zsh-autosuggestions .." +git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions +echo "Installing zsh-syntax-highlighting .." +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting diff --git a/setup/programs/package_manager/.DS_Store b/setup/programs/package_manager/.DS_Store new file mode 100644 index 0000000..329c4f7 Binary files /dev/null and b/setup/programs/package_manager/.DS_Store differ diff --git a/setup/programs/package_manager/apt/.DS_Store b/setup/programs/package_manager/apt/.DS_Store new file mode 100644 index 0000000..656addd Binary files /dev/null and b/setup/programs/package_manager/apt/.DS_Store differ diff --git a/setup/programs/package_manager/apt/others/firefox.sh b/setup/programs/package_manager/apt/others/firefox.sh new file mode 100644 index 0000000..a5cafe1 --- /dev/null +++ b/setup/programs/package_manager/apt/others/firefox.sh @@ -0,0 +1,3 @@ +sudo add-apt-repository ppa:mozillateam/ppa +sudo apt update +sudo apt install firefox diff --git a/setup/programs/package_manager/apt/others/i3.sh b/setup/programs/package_manager/apt/others/i3.sh new file mode 100644 index 0000000..a8da3ed --- /dev/null +++ b/setup/programs/package_manager/apt/others/i3.sh @@ -0,0 +1,5 @@ +/usr/lib/apt/apt-helper download-file https://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2023.02.18_all.deb keyring.deb SHA256:a511ac5f10cd811f8a4ca44d665f2fa1add7a9f09bef238cdfad8461f5239cc4 +$ sudo apt install ./keyring.deb +$ echo "deb http://debian.sur5r.net/i3/ $(grep '^DISTRIB_CODENAME=' /etc/lsb-release | cut -f2 -d=) universe" | sudo tee /etc/apt/sources.list.d/sur5r-i3.list +$ sudo apt update +$ sudo apt install i3 diff --git a/setup/programs/package_manager/apt/others/neovim.sh b/setup/programs/package_manager/apt/others/neovim.sh new file mode 100644 index 0000000..f3312d6 --- /dev/null +++ b/setup/programs/package_manager/apt/others/neovim.sh @@ -0,0 +1,7 @@ +curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage +chmod u+x nvim.appimage +./nvim.appimage --appimage-extract +./squashfs-root/AppRun --version +sudo mv squashfs-root / +sudo ln -s /squashfs-root/AppRun /usr/bin/nvim +nvim diff --git a/setup/programs/package_manager/apt/others/thunderbird.sh b/setup/programs/package_manager/apt/others/thunderbird.sh new file mode 100644 index 0000000..41ef58d --- /dev/null +++ b/setup/programs/package_manager/apt/others/thunderbird.sh @@ -0,0 +1,3 @@ +sudo add-apt-repository ppa:mozillateam/ppa +sudo apt update +sudo apt install thunderbird diff --git a/setup/programs/package_manager/apt/others/zotero.sh b/setup/programs/package_manager/apt/others/zotero.sh new file mode 100644 index 0000000..2487c53 --- /dev/null +++ b/setup/programs/package_manager/apt/others/zotero.sh @@ -0,0 +1,3 @@ +wget -qO- https://raw.githubusercontent.com/retorquere/zotero-deb/master/install.sh | sudo bash +sudo apt update +sudo apt install zotero diff --git a/setup/programs/package_manager/apt/packages.sh b/setup/programs/package_manager/apt/packages.sh new file mode 100644 index 0000000..ff1893e --- /dev/null +++ b/setup/programs/package_manager/apt/packages.sh @@ -0,0 +1,23 @@ +function install { + which $1 &> /dev/null + + if [ $? -ne 0 ]; then + echo "Installing: ${1}..." + sudo apt install -y $1 + else + echo "Already installed: ${1}" + fi +} + + + +apt_packages = (curl exfat-utils git htop tmux gimp inkscape texlive-full stow vlc blender gparted docker.io docker-compose python3-pip wget tree) + +sudo apt update + +for package in "${apt_packages}" +do + install ${package} +done + + diff --git a/setup/programs/package_manager/brew/install_brew.sh b/setup/programs/package_manager/brew/install_brew.sh new file mode 100644 index 0000000..4d96b5b --- /dev/null +++ b/setup/programs/package_manager/brew/install_brew.sh @@ -0,0 +1 @@ +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" diff --git a/setup/programs/package_manager/brew/packages.sh b/setup/programs/package_manager/brew/packages.sh new file mode 100644 index 0000000..4dd8dfa --- /dev/null +++ b/setup/programs/package_manager/brew/packages.sh @@ -0,0 +1,31 @@ +function install { + which $1 &> /dev/null + + if [ $? -ne 0 ]; then + echo "Installing: ${1}..." + if [ -z ${2} ] + then + brew install ${1} + else + brew install --cask ${1} + fi + else + echo "Already installed: ${1}" + fi +} + + +cask_packages = (gimp thunderbird firefox zotero rectangle vlc iterm2 inkscape obsidian blender mactex bitwarden visual-studio-code spotify) +other_packages = (neovim tmux docker docker-compose git curl zsh stow tree) + +brew update + +for package in "${cask_packages}" +do + install ${package} "cask" +done + +for package in "${other_packages}" +do + install ${package} +done