mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
Testing adding buster compatibility to source code enable
This commit is contained in:
+18
-8
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
################################################################################
|
################################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
######################## AmRRON Setup Script v0.5.4.4 ########################
|
######################## AmRRON Setup Script v0.5.5 ########################
|
||||||
######################## Created by TB-14 ########################
|
######################## Created by TB-14 ########################
|
||||||
######################## 31 Mar 2019 ########################
|
######################## 20 JUL 2019 ########################
|
||||||
################################################################################
|
################################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
@@ -455,16 +455,15 @@ tested.\n\nThis installer has been tested on Raspbian Stretch, Ubuntu \
|
|||||||
if hash lsb_release 2>/dev/null; then
|
if hash lsb_release 2>/dev/null; then
|
||||||
|
|
||||||
PLAT=$(lsb_release -si)
|
PLAT=$(lsb_release -si)
|
||||||
OSCN=$(lsb_release -sc) # We want this to be trusty xenial bionic; jessie
|
OSCN=$(lsb_release -sc) # We want this to be trusty xenial bionic cosmic; jessie strech buster; sara serena sonya sylvia tara tessa
|
||||||
#strech; sara serena sonya sylvia tara tessa
|
|
||||||
|
|
||||||
else # else get info from os-release
|
else # else get info from os-release
|
||||||
|
|
||||||
PLAT=$(grep "^NAME" /etc/os-release | awk -F "=" '{print $2}' | tr -d '"' \
|
PLAT=$(grep "^NAME" /etc/os-release | awk -F "=" '{print $2}' | tr -d '"' \
|
||||||
| awk '{print $1}')
|
| awk '{print $1}')
|
||||||
VER=$(grep "VERSION_ID" /etc/os-release | awk -F "=" '{print $2}' | tr -d '"')
|
VER=$(grep "VERSION_ID" /etc/os-release | awk -F "=" '{print $2}' | tr -d '"')
|
||||||
declare -A VER_MAP=(["9"]="stretch" ["8"]="jessie" ["16.04"]="xenial" \
|
declare -A VER_MAP=(["10"]="buster" ["9"]="stretch" ["8"]="jessie" ["16.04"]="xenial" \
|
||||||
["14.04"]="trusty" ["18.04"]="bionic" ["18"]="sara" ["18.1"]="serena" \
|
["14.04"]="trusty" ["18.04"]="bionic" ["18.10"]="cosmic" ["18"]="sara" ["18.1"]="serena" \
|
||||||
["18.2"]="sonya" ["18.3"]="sylvia" ["19"]="tara" ["19.1"]="tessa" )
|
["18.2"]="sonya" ["18.3"]="sylvia" ["19"]="tara" ["19.1"]="tessa" )
|
||||||
OSCN=${VER_MAP["${VER}"]}
|
OSCN=${VER_MAP["${VER}"]}
|
||||||
|
|
||||||
@@ -473,7 +472,7 @@ tested.\n\nThis installer has been tested on Raspbian Stretch, Ubuntu \
|
|||||||
case ${PLAT} in
|
case ${PLAT} in
|
||||||
Ubuntu|Raspbian|Debian|LinuxMint)
|
Ubuntu|Raspbian|Debian|LinuxMint)
|
||||||
case ${OSCN} in
|
case ${OSCN} in
|
||||||
trusty|xenial|bionic|jessie|stretch|sara|serena|sonya|sylvia|tara|tessa)
|
trusty|xenial|bionic|cosmic|jessie|stretch|buster|sara|serena|sonya|sylvia|tara|tessa)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
maybeOS_Support
|
maybeOS_Support
|
||||||
@@ -2879,7 +2878,7 @@ fi
|
|||||||
function enable_source_repositories() {
|
function enable_source_repositories() {
|
||||||
|
|
||||||
if [[ ${PLAT} = "Raspbian" ]]; then
|
if [[ ${PLAT} = "Raspbian" ]]; then
|
||||||
|
if [[ ${VER} = "stretch" ]]; then
|
||||||
sudo echo 'deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi' | \
|
sudo echo 'deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi' | \
|
||||||
sudo tee -a /etc/apt/sources.list && sudo apt-get -y update && \
|
sudo tee -a /etc/apt/sources.list && sudo apt-get -y update && \
|
||||||
yad \
|
yad \
|
||||||
@@ -2888,6 +2887,17 @@ yad \
|
|||||||
--title "Source Code Repositories Enabled" \
|
--title "Source Code Repositories Enabled" \
|
||||||
--text "Successfully enabled source code repositories" ${r} ${c}
|
--text "Successfully enabled source code repositories" ${r} ${c}
|
||||||
|
|
||||||
|
elif [[ ${VER} = "buster" ]]; then
|
||||||
|
|
||||||
|
sudo echo 'deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi' | \
|
||||||
|
sudo tee -a /etc/apt/sources.list && sudo apt-get -y update && \
|
||||||
|
yad \
|
||||||
|
--image=/tmp/banner.png \
|
||||||
|
--center --button="gtk-ok:0" \
|
||||||
|
--title "Source Code Repositories Enabled" \
|
||||||
|
--text "Successfully enabled source code repositories" ${r} ${c}
|
||||||
|
|
||||||
|
fi
|
||||||
elif [[ ${PLAT} = "Ubuntu" ]]; then
|
elif [[ ${PLAT} = "Ubuntu" ]]; then
|
||||||
|
|
||||||
software-properties-gtk
|
software-properties-gtk
|
||||||
|
|||||||
Reference in New Issue
Block a user