Skip to content

Commit ba54ef6

Browse files
committed
Add deb install
1 parent 850e96e commit ba54ef6

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

scripts/main.sh

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,11 @@ function base_sys() {
7878
slack
7979

8080
if [ "$(which 1password)" == "" ]; then
81-
INFO "Installing 1password"
82-
mkdir -p /tmp/1password
83-
cd /tmp/1password
84-
wget https://downloads.1password.com/linux/debian/amd64/stable/1password-latest.deb
85-
apt_install ./1password-latest.deb
86-
cd -
87-
rm -rf /tmp/1password
81+
deb_install 1password https://downloads.1password.com/linux/debian/amd64/stable/1password-latest.deb
8882
fi
8983

9084
if [ "$(which vivaldi)" == "" ]; then
91-
INFO "Installing Vivaldi"
92-
mkdir -p /tmp/vivaldi
93-
cd /tmp/vivaldi
94-
wget https://downloads.vivaldi.com/stable/vivaldi-stable_7.5.3735.54-1_amd64.deb
95-
apt_install ./vivaldi-stable*.deb
96-
cd -
97-
rm -rf /tmp/vivaldi
85+
deb_install vivaldi https://downloads.vivaldi.com/stable/vivaldi-stable_7.5.3735.54-1_amd64.deb
9886

9987
# add 1password support to vivaldi
10088
sudo mkdir -p /etc/1password
@@ -183,13 +171,7 @@ function havoc() {
183171
apt_install tailscale
184172

185173
if [ "$(which foxglove)" == "" ]; then
186-
INFO "Install foxglove"
187-
mkdir -p /tmp/foxglove
188-
cd /tmp/foxglove
189-
wget https://get.foxglove.dev/desktop/latest/foxglove-studio-latest-linux-amd64.deb
190-
apt_install ./foxglove-studio-*.deb
191-
cd -
192-
rm -rf /tmp/foxglove
174+
deb_isntall foxglove https://get.foxglove.dev/desktop/latest/foxglove-studio-latest-linux-amd64.deb
193175
fi
194176

195177
INFO "Installing wireshark"

scripts/utils.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,19 @@ function snap_install() {
122122
return 0
123123
}
124124

125+
function deb_install() {
126+
PACKAGE=$1
127+
HTTP=$2
128+
129+
INFO "Installing $PACKAGE"
130+
mkdir -p "/tmp/$PACKAGE"
131+
cd "/tmp/$PACKAGE" || exit 1
132+
wget "$HTTP"
133+
apt_install ./"$PACKAGE"*.deb
134+
cd - || exit 1
135+
rm -rf "/tmp/$PACKAGE"
136+
}
137+
125138
function pip3_install() {
126139
pip3 install "$@"
127140

0 commit comments

Comments
 (0)