From 60fe2c0912c683a42141d426b4cb917f92d939c9 Mon Sep 17 00:00:00 2001 From: Travis McLane Date: Fri, 10 Jan 2020 05:07:42 -0600 Subject: [PATCH] [326-platform-raspbian] feat: implement raspbian support (#327) --- cmd/linux.go | 5 +++++ cmd/linuxdb.yaml | 12 +++++++++++- cmd/system.go | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cmd/linux.go b/cmd/linux.go index 3cdbc633..8353c6b0 100644 --- a/cmd/linux.go +++ b/cmd/linux.go @@ -51,6 +51,8 @@ const ( ManjaroARM // Deepin distribution Deepin + // Raspbian distribution + Raspbian ) // DistroInfo contains all the information relating to a linux distribution @@ -106,6 +108,7 @@ func parseOsRelease(osRelease string) *DistroInfo { version = strings.Trim(splitLine[1], "\"") } } + // Check distro name against list of distros switch osID { case "fedora": @@ -142,6 +145,8 @@ func parseOsRelease(osRelease string) *DistroInfo { result.Distribution = ManjaroARM case "deepin": result.Distribution = Deepin + case "raspbian": + result.Distribution = Raspbian default: result.Distribution = Unknown } diff --git a/cmd/linuxdb.yaml b/cmd/linuxdb.yaml index e93d18ce..3f1c49cf 100644 --- a/cmd/linuxdb.yaml +++ b/cmd/linuxdb.yaml @@ -212,4 +212,14 @@ distributions: - name: gtk+:3 help: Please install with `sudo emerge gtk+:3` and try again - name: webkit-gtk - help: Please install with `sudo emerge webkit-gtk` and try again \ No newline at end of file + help: Please install with `sudo emerge webkit-gtk` and try again + + raspbian: + id: raspbian + releases: + default: + version: default + name: Raspbian + gccversioncommand: *gccdumpfullversion + programs: *debiandefaultprograms + libraries: *debiandefaultlibraries diff --git a/cmd/system.go b/cmd/system.go index de5ab11a..d503f53c 100644 --- a/cmd/system.go +++ b/cmd/system.go @@ -274,7 +274,7 @@ func CheckDependencies(logger *Logger) (bool, error) { distroInfo := GetLinuxDistroInfo() switch distroInfo.Distribution { - case Ubuntu, Debian, Zorin, Parrot, Linuxmint, Elementary, Kali, Neon, Deepin: + case Ubuntu, Debian, Zorin, Parrot, Linuxmint, Elementary, Kali, Neon, Deepin, Raspbian: libraryChecker = DpkgInstalled case Arch, ArcoLinux, Manjaro, ManjaroARM: libraryChecker = PacmanInstalled