summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2021-12-26 15:53:42 -0500
committerSam Chudnick <sam@chudnick.com>2021-12-26 15:53:42 -0500
commit8e87c43237a52940c443b559a050d16e3ddcac9e (patch)
tree1d6778a22fcbd625fc57d0022ac232236580a5f5
parent23d6e54e567abb0dd1f905b4f68c2e3792d001c4 (diff)
Test with -z instead of -n
-rwxr-xr-xinstall.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/install.sh b/install.sh
index ca9cafa..6b6738d 100755
--- a/install.sh
+++ b/install.sh
@@ -1,4 +1,4 @@
1#!/bin/sh 1#!/bin/bash
2 2
3# source configuration file 3# source configuration file
4source deploy.conf 4source deploy.conf
@@ -6,7 +6,7 @@ source deploy.conf
6# Change apt sources to use https 6# Change apt sources to use https
7sed -i "s/http:/https:/" /etc/apt/sources.list 7sed -i "s/http:/https:/" /etc/apt/sources.list
8 8
9[ -n $BACKPORTS ] && echo "deb https://deb.debian.org/debian/ bullseye-backports main" >> \ 9[ -z $BACKPORTS] && echo "deb https://deb.debian.org/debian/ bullseye-backports main" >> \
10 /etc/apt/sources.list 10 /etc/apt/sources.list
11 11
12# Update packages 12# Update packages
@@ -16,9 +16,9 @@ apt update -y && apt upgrade -y
16sed -i "s/main/main contrib non-free/" /etc/apt/sources.list 16sed -i "s/main/main contrib non-free/" /etc/apt/sources.list
17apt update -y 17apt update -y
18 18
19[ -n $AMDCPU ] && apt install amd64-microcode -y 19[ -z $AMDCPU ] && apt install amd64-microcode -y
20[ -n $AMDGPU ] && apt install firmware-amd-graphics -y 20[ -z $AMDGPU ] && apt install firmware-amd-graphics -y
21[ -n $INTELCPU ] && apt install intel-microcode -y 21[ -z $INTELCPU ] && apt install intel-microcode -y
22 22
23# Remove contrib and non-free repos 23# Remove contrib and non-free repos
24sed -i "s/main contrib non-free/main/" /etc/apt/sources.list 24sed -i "s/main contrib non-free/main/" /etc/apt/sources.list
@@ -30,7 +30,7 @@ apt install "$(cat packages.custom)" -y
30 30
31# For virtual machines 31# For virtual machines
32 32
33[ -n $VM ] && apt install spice-vdagent xserver-xorg-video-qxl -y 33[ -z $VM ] && apt install spice-vdagent xserver-xorg-video-qxl -y
34 34
35# basic configuration of ufw 35# basic configuration of ufw
36ufw default deny incoming 36ufw default deny incoming
@@ -55,7 +55,7 @@ rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME
55chsh -s $(which zsh) $USER 55chsh -s $(which zsh) $USER
56 56
57# DWM 57# DWM
58if [ -n $DWM ] then; 58if [ -z $DWM ] then;
59 mkdir -p $HOME/.local/src/ 59 mkdir -p $HOME/.local/src/
60 cd $HOME/.local/src/ 60 cd $HOME/.local/src/
61 sudo apt install libx11-dev libx11-xcb-dev libxcb-res0-dev libxft-dev libxinerama-dev -y 61 sudo apt install libx11-dev libx11-xcb-dev libxcb-res0-dev libxft-dev libxinerama-dev -y
@@ -66,7 +66,7 @@ if [ -n $DWM ] then;
66fi 66fi
67 67
68# DWMBLOCKS 68# DWMBLOCKS
69if [ -n $DWMBLOCKS ] then; 69if [ -z $DWMBLOCKS ] then;
70 mkdir -p $HOME/.local/src/ 70 mkdir -p $HOME/.local/src/
71 cd $HOME/.local/src/ 71 cd $HOME/.local/src/
72 sudo apt install libx11-dev -y 72 sudo apt install libx11-dev -y
@@ -77,10 +77,10 @@ if [ -n $DWMBLOCKS ] then;
77fi 77fi
78 78
79# SSH 79# SSH
80[ -n $CONFIG_SSH ] && ssh-keygen 80[ -z $CONFIG_SSH ] && ssh-keygen
81 81
82# SSH SERVER 82# SSH SERVER
83[ -n $CONFIG_SSH_SERVER ] && sudo apt install openssh-server -y && sudo ufw allow ssh 83[ -z $CONFIG_SSH_SERVER ] && sudo apt install openssh-server -y && sudo ufw allow ssh
84 84
85# GPG 85# GPG
86[ -n $CONFIG_GPG ] && gpg --full-gen-key 86[ -z $CONFIG_GPG ] && gpg --full-gen-key