-
Notifications
You must be signed in to change notification settings - Fork 0
/
requirements.sh
executable file
·38 lines (33 loc) · 1.17 KB
/
requirements.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# The requirements.sh is an advanced mechanism an should rarely be needed.
# Be aware that it won't run with root permissions and 'sudo' won't work
# in most cases.
##########################
# The below code shows you how to do conditional installations for different distributions.
# Uncomment the code first by removing the pound `#` signs in front of each line.
##########################
# detect distribution using lsb_release (may be replaced parsing /etc/*release)
# dist=$(lsb_release -ds)
# setting dependencies and package manager in relation to the distribution
# if $(hash pkcon 2>/dev/null); then
# pm="pkcon"
# else
# priv="sudo"
# if [ "$dist" == "\"Arch Linux\"" ]; then
# pm="pacman -S"
# dependencies=( aaa )
# elif [[ "$dist" =~ "Ubuntu" ]] || [[ "$dist" =~ "Debian" ]] ||[[ "$dist" =~ "Raspbian" ]]; then
# pm="apt install"
# dependencies=( bbb)
# elif [[ "$dist" =~ "SUSE" ]]; then
# pm="zypper install"
# dependencies=( ccc )
# fi
# fi
# installing dependencies
# if [ ! -z "$pm" ]; then
# for dep in "${dependencies[@]}"
# do
# $priv $pm $dep
# done
# fi