[Git][NTPsec/ntpsec][master] buildprep code simplification.

Eric S. Raymond gitlab at mg.gitlab.com
Wed Mar 15 14:33:08 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
c4d69c19 by Eric S. Raymond at 2017-03-15T10:30:25-04:00
buildprep code simplification.

- - - - -


1 changed file:

- buildprep


Changes:

=====================================
buildprep
=====================================
--- a/buildprep
+++ b/buildprep
@@ -32,32 +32,33 @@ inst=""
 if emerge --version 2>/dev/null
 then
     installer=emerge
-    install="$installer -q y"
+    install="$do $installer -q y"
 elif yum version 2>/dev/null
 then
     installer=yum
-    install="$installer install"
+    install="$do $installer install"
 elif dnf --version >/dev/null 2>&1
 then
     installer=dnf
-    install="$installer install"
+    install="$do $installer install"
 elif apt-get --version >/dev/null 2>&1
 then
     installer=apt
-    install="apt-get install -y"
+    install="$do apt-get install -y"
 elif zypper -h >/dev/null 2>&1
 then
     # OpenSUSE prefers zypper over yast
     installer=zypper
-    install="$installer install -y"
+    install="$do $installer install -y"
 elif yast -h >/dev/null 2>&1
 then
     installer=yast
-    install="$installer --install"
+    install="$do $installer --install"
 else
     installer=unknown
 fi
 echo "# Your package installer is ${installer}."
+echo ""
 
 # In order to have a single point of truth about prerequisite package names,
 # these package name lists have been *removed* from INSTALL.
@@ -75,38 +76,38 @@ daemon () {
     # Prerequisites to build the daemon: bison, pps-tools, service libraries
     case $installer in
 	apt)
-	    $do $install bison libssl-dev		# build
-	    $do $install libcap-dev libseccomp-dev	# build
-	    $do $install libavahi-compat-libdnssd-dev	# optional build
-	    $do $install libssl1.0.0 libcap2 pps-tools
+	    $install bison libssl-dev			# build
+	    $install libcap-dev libseccomp-dev		# build
+	    $install libavahi-compat-libdnssd-dev	# optional build
+	    $install libssl1.0.0 libcap2 pps-tools
 	    ;;
 	emerge)
-	    $do $install sys-libs/libcap sys-libs/libseccomp
-	    $do $install sys-devel/bison net-misc/pps-tools
+	    $install sys-libs/libcap sys-libs/libseccomp
+	    $install sys-devel/bison net-misc/pps-tools
 	    ;;
 	yum|dnf)
-	    $do $install bison openssl-devel 		# build
-	    $do $install libcap-devel libseccomp-devel	# build
-	    $do $install pps-tools-devel		# build
-	    $do $install avahi-compat-libdns_sd-devel	# optional build
-	    $do $install libcap openssl-libs pps-tools
+	    $install bison openssl-devel 		# build
+	    $install libcap-devel libseccomp-devel	# build
+	    $install pps-tools-devel			# build
+	    $install avahi-compat-libdns_sd-devel	# optional build
+	    $install libcap openssl-libs pps-tools
 	    ;;
 	yast)
 	    echo "# SLES versions 12 and earlier do not have pps-tools"
-	    $do $install basis-devel 			# build
-	    $do $install libcap-devel libseccomp-devel 	# build
-	    $do $install openssl-devel			# build
-	    $do $install libcap2 openssl-libs
+	    $install basis-devel 			# build
+	    $install libcap-devel libseccomp-devel 	# build
+	    $install openssl-devel			# build
+	    $install libcap2 openssl-libs
 	    ;;
 	zypper)
-	    $do $install gcc6 gcc6-info gcc6-locale	# build
-	    $do $install bison				# build
-	    $do $install libcap-devel libseccomp-devel	# build
-	    $do $install openssl-devel			# build
+	    $install gcc6 gcc6-info gcc6-locale	# build
+	    $install bison				# build
+	    $install libcap-devel libseccomp-devel	# build
+	    $install openssl-devel			# build
 	    echo "# SLES versions 12 and earlier do not have pps-tools"
-	    $do $install pps-tools-devel		# build
-	    $do $install pps-tools
-	    $do $install libcap2 openssl-libs
+	    $install pps-tools-devel			# build
+	    $install pps-tools
+	    $install libcap2 openssl-libs
 	    ;;
     esac
 }
@@ -115,10 +116,10 @@ tools () {
     # Prerequisites for the client Python tools: python extensions
     case $installer in
 	apt)
-	    $do $install python-dev
+	    $install python-dev
 	    ;;
 	yum|dnf|yast|zypper)
-	    $do $install python-devel
+	    $install python-devel
 	    ;;
     esac
 }
@@ -131,30 +132,27 @@ ntpviz () {
 	    if [ "$distro" = "Ubuntu" ]
 	    then
 		echo "# Looks like an Ubuntu system"
-		$do $install gnuplot5
+		$install gnuplot5
 	    else
 		echo "# Looks like a generic Debian system"
-		$do $install gnuplot
+		$install gnuplot
 	    fi
-	    $do $install fonts-liberation
+	    $install fonts-liberation
 	    ;;
 	emerge)
-	    $do $install sci-visualization/gnuplot
-	    $do $install media-fonts/liberation-fonts
+	    $install sci-visualization/gnuplot
+	    $install media-fonts/liberation-fonts
 	    ;;
 	yum|dnf)
-	    $do $install gnuplot
-	    $do $install liberation-fonts-common.noarch
-	    $do $install liberation-mono-fonts.noarch
-	    $do $install liberation-narrow-fonts.noarch
-	    $do $install liberation-sans-fonts.noarch
-	    $do $install liberation-serif-fonts.noarch
-	    ;;
-	yast)
-	    $do $install gnuplot liberation-fonts
+	    $install gnuplot
+	    $install liberation-fonts-common.noarch
+	    $install liberation-mono-fonts.noarch
+	    $install liberation-narrow-fonts.noarch
+	    $install liberation-sans-fonts.noarch
+	    $install liberation-serif-fonts.noarch
 	    ;;
-	zypper)
-	    $do $install gnuplot liberation-fonts
+	yast|zypper)
+	    $install gnuplot liberation-fonts
 	    ;;
     esac
 }



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/c4d69c198cb347f4dad0785558eb0c8a137d2074
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170315/722247db/attachment.html>


More information about the vc mailing list