]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Handle missing `lsb_release`
authorTravis Cross <tc@traviscross.com>
Thu, 25 Dec 2014 03:51:30 +0000 (03:51 +0000)
committerTravis Cross <tc@traviscross.com>
Thu, 25 Dec 2014 03:51:30 +0000 (03:51 +0000)
The lsb-release package isn't a stated dependency and isn't present on
a minimal Debian install.

debian/util.sh

index f024a8c9c03119e3570b70e1ec3dd987f2785a95..052762b91c9621956de01a43502a4c54f641d7f1 100755 (executable)
@@ -386,18 +386,23 @@ build_all () {
   shift $(($OPTIND-1))
   [ -n "$archs" ] || archs="amd64 i386"
   if [ -z "$distros" ]; then
-    case "$(lsb_release -is)" in
-      Debian)
-        distros="sid jessie wheezy"
-        ;;
-      Ubuntu)
-        distros="utopic trusty"
-        ;;
-      *)
-        echo "Unknown distribution"
-        exit -1
-        ;;
-    esac
+    local default_distros="sid jessie wheezy"
+    if [ -z "$(which lsb_release)" ]; then
+      distros="$default_distros"
+    else
+      case "$(lsb_release -is)" in
+        Debian)
+          distros="$default_distros"
+          ;;
+        Ubuntu)
+          distros="utopic trusty"
+          ;;
+        *)
+          echo "Unknown distribution"
+          exit -1
+          ;;
+      esac
+    fi
   fi
   ! $depinst || aptitude install -y \
     rsync git less cowbuilder ccache \