├── LICENSE ├── README.MD ├── betterlockscreen.sh ├── grive2.sh └── picom.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Utkarsh Verma 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | # Installer Scripts 2 | This repository contains installer scripts for various online resources. The aim here is to do the installation of such resources in one command by letting these scripts handle the whole installation procedure, that is installing the dependencies etc. 3 | 4 | The scripts are written in `bash`. They will remove the fetched resources and other auxiliary packages, installed during execution, after the completion of the installation. 5 | 6 | **Currently, these scripts are aimed at Debian systems and its derivatives, such as Ubuntu etc., only.** 7 | 8 | The installed packages are logged in the `/etc/installer-scripts.log` file after installation. The log is in the following format: 9 | ``` 10 | - ; ; ; 11 | ``` 12 | 13 | ## List of Scripts: 14 | The following installer scripts are currently present: 15 | * betterlockscreen - [pavanjadhaw/betterlockscreen](https://github.com/pavanjadhaw/betterlockscreen) 16 | * grive2 - [vitalif/grive2](https://github.com/vitalif/grive2) 17 | * picom - [yshui/picom](https://github.com/yshui/picom) 18 | -------------------------------------------------------------------------------- /betterlockscreen.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | # Bash installation script for installing 'https://github.com/pavanjadhaw/betterlockscreen' in one go. 3 | # Run this script as root 4 | 5 | # Installation candidate details 6 | install_candidate="betterlockscreen"; 7 | vendor="GitHub/pavanjadhaw"; 8 | repo="https://github.com/pavanjadhaw/betterlockscreen" 9 | 10 | # Install dependencies 11 | printf -- "----------------------------------------------------------------------------------------------------"; 12 | printf "\n Installing dependencies. May take a few minutes.\n"; 13 | printf -- "----------------------------------------------------------------------------------------------------\n"; 14 | 15 | ## Check for and install absent auxiliary packages 16 | AUX_PACK="build-essential checkinstall curl git"; 17 | ABSENT_PACKAGES=""; 18 | for package in $AUX_PACK; do 19 | packageExists=""; 20 | [[ $(echo `dpkg-query -W $package 2>&1` | grep -o "no packages found") = "" ]] && packageExists="exists"; 21 | [[ ! $packageExists ]] && ABSENT_PACKAGES+="$package "; 22 | done 23 | [[ $ABSENT_PACKAGES ]] && sudo apt install $AUX_PACK; 24 | printf "\n"; 25 | 26 | # Fetch version of script 27 | version=$(git ls-remote -q --tags $repo | tail -1 | grep -oP "(?<=v).*$"); 28 | 29 | ## Dependencies 30 | sudo apt install bc imagemagick libjpeg-turbo8-dev libpam0g-dev libxcb-composite0 libxcb-composite0-dev \ 31 | libxcb-image0-dev libxcb-randr0 libxcb-util-dev libxcb-xinerama0 libxcb-xinerama0-dev libxcb-xkb-dev \ 32 | libxkbcommon-x11-dev feh libev-dev; 33 | printf "\n"; 34 | 35 | ## Install i3lock-color dependency 36 | git clone https://github.com/PandorasFox/i3lock-color && cd i3lock-color; 37 | autoreconf -i; ./configure; 38 | make; sudo checkinstall --pkgname=i3lock-color --pkgversion=1 -y; 39 | cd .. && sudo rm -r i3lock-color; 40 | 41 | printf -- "\n----------------------------------------------------------------------------------------------------"; 42 | printf "\n Dependencies installed! Proceeding ahead with the script.\n"; 43 | printf -- "----------------------------------------------------------------------------------------------------\n"; 44 | 45 | # Fetch the script and remove it after copying 46 | if [[ -f /usr/bin/betterlockscreen ]]; then 47 | sudo rm /usr/bin/betterlockscreen; 48 | fi 49 | curl -o script https://raw.githubusercontent.com/pavanjadhaw/betterlockscreen/master/betterlockscreen; 50 | sudo cp script /usr/bin/betterlockscreen; 51 | sudo chmod +x /usr/bin/betterlockscreen; 52 | rm script; 53 | 54 | printf -- "\n----------------------------------------------------------------------------------------------------"; 55 | printf "\n Script installed! Removing unused packages.\n"; 56 | printf -- "----------------------------------------------------------------------------------------------------\n"; 57 | 58 | ## Remove non-pre-existing auxiliary packages 59 | [[ $ABSENT_PACKAGES ]] && sudo apt remove $ABSENT_PACKAGES; 60 | 61 | # Add logs for the installation candidate 62 | echo "$install_candidate - $vendor; $version; $(date); $(date +%s)" | sudo tee --append /etc/installer-scripts.log > /dev/null; 63 | 64 | printf -- "\n----------------------------------------------------------------------------------------------------"; 65 | printf "\n Installation complete! Feel free to use the '$install_candidate' command now."; 66 | printf -- "\n----------------------------------------------------------------------------------------------------"; 67 | -------------------------------------------------------------------------------- /grive2.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | #------------------------------------------------------------------------------------- 4 | # MIT License 5 | # Copyright (c) 2018 Utkarsh Verma 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #------------------------------------------------------------------------------------- 24 | 25 | # Bash installation script for installing 'https://github.com/vitalif/grive2' in one go. 26 | # Run this script as root 27 | 28 | # Installation candidate details 29 | install_candidate="grive2"; 30 | command="grive" 31 | vendor="GitHub/vitalif"; 32 | repo="https://github.com/vitalif/grive2" 33 | 34 | AUX_PACK="build-essential checkinstall cmake git pkg-config"; 35 | DEP="libgcrypt20-dev libyajl-dev libboost-all-dev libcurl4-openssl-dev \ 36 | libexpat1-dev libcppunit-dev binutils-dev zlib1g-dev"; 37 | 38 | printf -- "----------------------------------------------------------------------------------------------------"; 39 | printf "\n Installing dependencies. May take a few minutes.\n"; 40 | printf -- "----------------------------------------------------------------------------------------------------"; 41 | 42 | # Check for and install absent auxiliary packages 43 | ABSENT_PACKAGES=""; 44 | for package in $AUX_PACK; do 45 | packageExists=""; 46 | [[ $(echo `dpkg-query -W $package 2>&1` | grep -o "no packages found") = "" ]] && packageExists="exists"; 47 | [[ ! $packageExists ]] && ABSENT_PACKAGES+="$package "; 48 | done 49 | [[ $ABSENT_PACKAGES ]] && sudo apt install $AUX_PACK; 50 | printf "\n"; 51 | 52 | # Fetch version of script 53 | version=$(git ls-remote -q --tags $repo | tail -1 | grep -oP "(?<=v).*$"); 54 | 55 | # Install dependencies 56 | sudo apt install $DEP; 57 | 58 | printf -- "\n----------------------------------------------------------------------------------------------------"; 59 | printf "\n Dependencies installed! Proceeding ahead with the installation.\n"; 60 | printf -- "----------------------------------------------------------------------------------------------------\n"; 61 | 62 | # Fetch the source code 63 | git clone $repo; 64 | 65 | # Build the source code and install it 66 | cd $install_candidate; 67 | mkdir build && cd build; 68 | cmake ..; 69 | make -j4; 70 | sudo checkinstall --pkgname $install_candidate --pkgversion $version -y; 71 | 72 | printf -- "\n----------------------------------------------------------------------------------------------------"; 73 | printf "\n '$install_candidate' installed! Removing unused packages.\n"; 74 | printf "\n If you wish to uninstall it, use 'sudo dpkg -r $install_candidate'." 75 | printf -- "\n----------------------------------------------------------------------------------------------------\n"; 76 | 77 | # Remove non-pre-existing auxiliary packages 78 | [[ $ABSENT_PACKAGES ]] && sudo apt remove $ABSENT_PACKAGES; 79 | 80 | # Add logs for the installation candidate 81 | echo "$install_candidate - $vendor; $version; $(date); $(date +%s)" | \ 82 | sudo tee --append /etc/installer-scripts.log > /dev/null; 83 | 84 | printf -- "\n----------------------------------------------------------------------------------------------------"; 85 | printf "\n Installation complete! Feel free to use the '$command' command now."; 86 | printf -- "\n----------------------------------------------------------------------------------------------------"; 87 | -------------------------------------------------------------------------------- /picom.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | #------------------------------------------------------------------------------------- 4 | # MIT License 5 | # Copyright (c) 2018 Utkarsh Verma 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | 13 | # The above copyright notice and this permission notice shall be included in all 14 | # copies or substantial portions of the Software. 15 | 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | # SOFTWARE. 23 | #------------------------------------------------------------------------------------- 24 | 25 | # Bash installation script for installing 'https://github.com/yshui/picom' in one go. 26 | # Run this script as root 27 | 28 | # Installation candidate details 29 | install_candidate="picom"; 30 | command="picom" 31 | vendor="GitHub/yshui"; 32 | repo="https://github.com/yshui/picom" 33 | 34 | function install { 35 | AUX_PACK="git meson" 36 | DEP="libxcb1-dev libxcb-damage0-dev libxcb-xfixes0-dev libxcb-shape0-dev \ 37 | libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev \ 38 | libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxext-dev \ 39 | libxcb-xinerama0-dev libpixman-1-dev libdbus-1-dev libconfig-dev \ 40 | libgl1-mesa-dev libpcre2-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev"; 41 | 42 | printf -- "----------------------------------------------------------------------------------------------------"; 43 | printf "\n Installing dependencies. May take a few minutes.\n"; 44 | printf -- "----------------------------------------------------------------------------------------------------"; 45 | 46 | # Check for and install absent auxiliary packages 47 | ABSENT_PACKAGES=""; 48 | for package in $AUX_PACK; do 49 | packageExists=""; 50 | [[ $(echo `dpkg-query -W $package 2>&1` | grep -o "no packages found") = "" ]] && packageExists="exists"; 51 | [[ ! $packageExists ]] && ABSENT_PACKAGES+="$package "; 52 | done 53 | [[ $ABSENT_PACKAGES ]] && sudo apt install $AUX_PACK; 54 | printf "\n"; 55 | 56 | # Fetch version of script 57 | version=$(git ls-remote -q --tags $repo | tail -1 | grep -oP "(?<=v).*$"); 58 | 59 | # Install dependencies 60 | sudo apt install $DEP; 61 | 62 | printf -- "\n----------------------------------------------------------------------------------------------------"; 63 | printf "\n Dependencies installed! Proceeding ahead with the installation.\n"; 64 | printf -- "----------------------------------------------------------------------------------------------------\n"; 65 | 66 | # Fetch the source code 67 | git clone $repo; 68 | 69 | # Build the source code and install it 70 | cd $install_candidate; 71 | git submodule update --init --recursive; 72 | meson --buildtype=release . build; 73 | ninja -C build; 74 | ninja -C build install; 75 | 76 | printf -- "\n----------------------------------------------------------------------------------------------------"; 77 | printf "\n '$install_candidate' installed! Removing unused packages.\n"; 78 | printf "\n If you wish to uninstall it, run this script script again as 'bash picom.sh -u'" 79 | printf -- "\n----------------------------------------------------------------------------------------------------\n"; 80 | 81 | # Remove non-pre-existing auxiliary packages 82 | [[ $ABSENT_PACKAGES ]] && sudo apt remove $ABSENT_PACKAGES; 83 | 84 | # Add logs for the installation candidate 85 | echo "$install_candidate - $vendor; $version; $(date); $(date +%s)" | \ 86 | sudo tee --append /etc/installer-scripts.log > /dev/null; 87 | 88 | printf -- "\n----------------------------------------------------------------------------------------------------"; 89 | printf "\n Installation complete! Feel free to use the '$command' command now."; 90 | printf -- "\n----------------------------------------------------------------------------------------------------"; 91 | } 92 | 93 | function uninstall { 94 | printf -- "\n----------------------------------------------------------------------------------------------------"; 95 | printf "\n Beginning the uninstallation."; 96 | printf -- "\n----------------------------------------------------------------------------------------------------\n"; 97 | 98 | cd $install_candidate; 99 | ninja -C build uninstall; 100 | 101 | printf -- "\n----------------------------------------------------------------------------------------------------"; 102 | printf "\n '$install_candidate' uninstalled."; 103 | printf -- "\n----------------------------------------------------------------------------------------------------"; 104 | } 105 | 106 | case "$1" in 107 | -i) install ;; 108 | -u) uninstall ;; 109 | *) echo "Option $1 not recognized" ;; 110 | esac 111 | --------------------------------------------------------------------------------