From 56ed33c8f7a8a6ade18fcb39cc742c944bc9c22b Mon Sep 17 00:00:00 2001 From: araison Date: Sun, 21 Jan 2024 18:22:26 +0100 Subject: [PATCH] Initial commit --- setup/.DS_Store | Bin 0 -> 6148 bytes setup/install.sh | 50 ++++++++++++++++++ setup/programs/.DS_Store | Bin 0 -> 6148 bytes setup/programs/dotfiles/packages.sh | 7 +++ setup/programs/others/nerd-font.sh | 2 + setup/programs/others/oh-my-zsh.sh | 1 + setup/programs/others/powerlevel10k.sh | 1 + .../programs/others/python3-libs/packages.sh | 10 ++++ setup/programs/others/zsh-plugins.sh | 4 ++ setup/programs/package_manager/.DS_Store | Bin 0 -> 6148 bytes setup/programs/package_manager/apt/.DS_Store | Bin 0 -> 6148 bytes .../package_manager/apt/others/firefox.sh | 3 ++ .../programs/package_manager/apt/others/i3.sh | 5 ++ .../package_manager/apt/others/neovim.sh | 7 +++ .../package_manager/apt/others/thunderbird.sh | 3 ++ .../package_manager/apt/others/zotero.sh | 3 ++ .../programs/package_manager/apt/packages.sh | 23 ++++++++ .../package_manager/brew/install_brew.sh | 1 + .../programs/package_manager/brew/packages.sh | 31 +++++++++++ 19 files changed, 151 insertions(+) create mode 100644 setup/.DS_Store create mode 100644 setup/install.sh create mode 100644 setup/programs/.DS_Store create mode 100644 setup/programs/dotfiles/packages.sh create mode 100644 setup/programs/others/nerd-font.sh create mode 100644 setup/programs/others/oh-my-zsh.sh create mode 100644 setup/programs/others/powerlevel10k.sh create mode 100644 setup/programs/others/python3-libs/packages.sh create mode 100644 setup/programs/others/zsh-plugins.sh create mode 100644 setup/programs/package_manager/.DS_Store create mode 100644 setup/programs/package_manager/apt/.DS_Store create mode 100644 setup/programs/package_manager/apt/others/firefox.sh create mode 100644 setup/programs/package_manager/apt/others/i3.sh create mode 100644 setup/programs/package_manager/apt/others/neovim.sh create mode 100644 setup/programs/package_manager/apt/others/thunderbird.sh create mode 100644 setup/programs/package_manager/apt/others/zotero.sh create mode 100644 setup/programs/package_manager/apt/packages.sh create mode 100644 setup/programs/package_manager/brew/install_brew.sh create mode 100644 setup/programs/package_manager/brew/packages.sh diff --git a/setup/.DS_Store b/setup/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..3eeed3fc4733232bb35811a34a22ce4be8a645cf GIT binary patch literal 6148 zcmeHK%}T>S5T0$T-BN@e6nYGJE!aXOh?h|H1&ruHr6#o0V45vSYYwH5v%Zi|;`2DO zyAeuz@FZeqVE3DypWVy{*&hH9gT<%^&;kI7jZl!XMaaC>Rk6W@LeG&x08_}qJezHq z=r5Y++a=5(1qBoAzrR0>RfxWia27||yxaX0m1=Eozb@;tDIfi3mHYExzQ_hadQYPp zrQ)#EgYY&Q=fl?Fg-Yf@l#ElI5RJwd@^BX=Bb5)-A{k{m*EbH?kd0xhyAEiJz0=jIA&-tv&aa0r@ib9yhD?FHYdNr3!aFJ(b-ns&602l_zA~?jXJiJL z0cL<1*c}G!86caxQ!-b|3@`&fWPtVu2OFVhu`sB&4(#aqO#T`n3F`EgAapEx77K&u zK@lbu(WDCd#1JMO?T(G}EEWb$ItaZo&SO_DA1^|$j&?_fgYXP;&kQgF>kL%Qutn$p z75*|?ANlJkJYoizfq%w;s9pM(11!p(tsCXhS?geX!bU=I1t}<~uU!IgK>J8rJB{BV a9pgNUg+ZEy>^dEhF9Mnn?wEmJVBiZm8cjn0 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..cf6e0289443c7eb1d098e0151c34806bc2496148 GIT binary patch literal 6148 zcmeHK!A{#i5S@hp8xU#^6mhgvsVAf+QmUxx#f0z!bp?mE3N}s?3)>sn4mm`Td~W}x zXO3L@3;YT9&g>2n!BlVowb70=`(}4%b~Vr0-3$PT?j&phGyp)N64o}cc|d5Mv?41! zLUBT`5kU+C$b)Gk=@9p! zeAe~X7~xHtnY(lezQsaL_ws!OWANb&&aoY0)_q9OO1YQOYqA6kJd))-PVi^&?80Y9 zZaw=>b_2_RW#E5ffbItemC$7@4eF}{8(jh*)^J!0+EhzWjKkOM@mH1Q#EIcNScs2)#S5?`U@ru0h*c1}p=M46K@NgWmt6zt{hZLAGZZ zuna5}1ESXRdRG?4R~pnI*zj|#4SI_AP_^KkLk6PDSQ^9;6#GX& M(_kCRz>6~Q2Wgh^2LJ#7 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..329c4f7c5f5b9ce4ca440ef3ccb24e39b8755ffa GIT binary patch literal 6148 zcmeHK!AiqG5S?wSO(;SR3OxqA7Hpvs#7n6914i_qQWIJ<7_+5G&7l->)*tdq{2pg^ zx5ZlRQKZhm?3YOvd$P6$8%)mMZ%r0s*)&=nzGr$b|O9p6va8U_;gQZ5bb>N^{07SY*DnXli z3CeK|`UXplxPl^dDxyvmro|9C9sRC}^9`07bvg*sd!RMFl2BZ!aglPNjp#w)i-4km2WH?`8TbHGPlb~J literal 0 HcmV?d00001 diff --git a/setup/programs/package_manager/apt/.DS_Store b/setup/programs/package_manager/apt/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..656addd7ee358ca6e950fed9a0f9c33596c02235 GIT binary patch literal 6148 zcmeHK%}T>S5Z-NTn^J@v6nYGJE!aXOh?fxc1&ruHr6wfUV9b^zHHT8jSzpK}@p+ut z-5i1eZz6UEcE8#A+0A^A{b7u8cOA|cGZ|wBG(?U{i=esH)zQI-T+WfPJSg*3kcgmV zqQ7XuZ|^g~3btesYkvPnuu9^*m`*==r`y}>4~&5^G9J98D80fj*179vcR0EhA_;2U z4{qY9T$l&vA}#zljWU@KhY^I_-^OVuN>{AYFqgTWau`EnxG=|?&3t+~vF3AoJFzyl zZG%2L*=~o%;nDHg)#5pMNyVEYk^|>b_BGb<4oah@S1(Hwkv@UF&Z%Pwi2-7O7$63A zj{$ua7^B@Qohl{U3v0s?yD5-N5;~r{1)mE=V+`H U;w)&F>40<*kc3c24EzEEUz8wBWB>pF literal 0 HcmV?d00001 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