Skip to content

Commit

Permalink
Allow manually overriding lsb_dist from outside the script.
Browse files Browse the repository at this point in the history
  • Loading branch information
dHannasch committed May 8, 2021
1 parent e9faf4d commit d8af993
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ check_forked() {
EOF

# Get the upstream release info
lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[:space:]')
if [ -z ${lsb_dist} ]; then
lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[:space:]')
fi
dist_version=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'codename' | cut -d ':' -f 2 | tr -d '[:space:]')

# Print info about upstream distro
Expand Down Expand Up @@ -301,7 +303,9 @@ do_install() {
fi

# perform some very rudimentary platform detection
lsb_dist=$( get_distribution )
if [ -z ${lsb_dist} ]; then
lsb_dist=$( get_distribution )
fi
lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')"

if is_wsl; then
Expand Down

0 comments on commit d8af993

Please sign in to comment.