From 6565bc015292d2f9d530d738a5b292047b5b5b54 Mon Sep 17 00:00:00 2001
From: Jason Hiser <jdhiser@gmail.com>
Date: Wed, 3 Jul 2019 11:18:11 -0400
Subject: [PATCH] removed i386 dependencies for peaosup, may need to add them
 back in diehard module

---
 get-peasoup-packages.sh | 115 ++++++++++++++++++++--------------------
 1 file changed, 57 insertions(+), 58 deletions(-)

diff --git a/get-peasoup-packages.sh b/get-peasoup-packages.sh
index 1a055c134..06421fb49 100755
--- a/get-peasoup-packages.sh
+++ b/get-peasoup-packages.sh
@@ -1,11 +1,5 @@
 #!/bin/bash
 
-#
-# in case your OS doesn't support i386 packages.
-#
-#dpkg --add-architecture i386
-#sudo apt-get update
-
 # Needed to build components
 BASE_PKGS="
   scons
@@ -19,7 +13,6 @@ BASE_PKGS="
   autoconf
   apt-libelf-dev
   yum-libelf-devel
-  libstdc++6:i386
   coreutils
   makeself
   "
@@ -41,7 +34,6 @@ fi
 #  apt-libxml2-dev
 #  yum-libxml2-devel
 #
-# TODO: don't require i386 libraries if not running MEDS (eg using IDA server)
 
 # For clients of IRDB
 CLIENT_IRDB_PKGS="
@@ -103,56 +95,63 @@ install_packs()
 	fi
 }
 
-args="$@"
-if [[ $args = "" ]]; then
-	args="all"
-fi
 
-which apt-get 1> /dev/null 2> /dev/null 
-if [[ $? != 0  ]]; then
-	#setup extra repositories on centos
-	sudo yum install epel-release -y
-fi
+main()
+{
+	local args="$@"
+	if [[ $args = "" ]]; then
+		args="all"
+	fi
 
-for arg in $args; do
-    case $arg in
-    all)
-	install_packs $ALL_PKGS
-	;;
-    build)
-	install_packs $BASE_PKGS $CLIENT_IRDB_PKGS
-        ;;
-    test)
-	install_packs $ALL_PKGS
-        ;;
-    deploy)
-	install_packs $CLIENT_IRDB_PKGS $SERVER_IRDB_PKGS
-        ;;
-    base)
-	install_packs $BASE_PKGS
-	;;
-    client-irdb)
-	install_packs $CLIENT_IRDB_PKGS
-	;;
-    server-irdb)
-	install_packs $SERVER_IRDB_PKGS
-	;;
-    irdb)
-	install_packs $CLIENT_IRDB_PKGS $SERVER_IRDB_PKGS
-	;;
-
-    *)
-	echo "$arg not recognized. Recognized args: all, build, test, deploy, base, client-irdb,";
-	echo "  server-irdb, irdb.";
-    esac
-done
-
-orig_dir=$(pwd)
-
-if [ ! -z $DAFFY_HOME ]; then
-	cd daffy
-	sudo ./get-packages.sh
-	cd $orig_dir
-fi
+	which apt-get 1> /dev/null 2> /dev/null 
+	if [[ $? != 0  ]]; then
+		#setup extra repositories on centos
+		sudo yum install epel-release -y
+	fi
+
+	for arg in $args; do
+	    case $arg in
+	    all)
+		install_packs $ALL_PKGS
+		;;
+	    build)
+		install_packs $BASE_PKGS $CLIENT_IRDB_PKGS
+		;;
+	    test)
+		install_packs $ALL_PKGS
+		;;
+	    deploy)
+		install_packs $CLIENT_IRDB_PKGS $SERVER_IRDB_PKGS
+		;;
+	    base)
+		install_packs $BASE_PKGS
+		;;
+	    client-irdb)
+		install_packs $CLIENT_IRDB_PKGS
+		;;
+	    server-irdb)
+		install_packs $SERVER_IRDB_PKGS
+		;;
+	    irdb)
+		install_packs $CLIENT_IRDB_PKGS $SERVER_IRDB_PKGS
+		;;
+
+	    *)
+		echo "$arg not recognized. Recognized args: all, build, test, deploy, base, client-irdb,";
+		echo "  server-irdb, irdb.";
+	    esac
+	done
+
+	orig_dir=$(pwd)
+
+	if [ ! -z $DAFFY_HOME ]; then
+		cd daffy
+		sudo ./get-packages.sh
+		cd $orig_dir
+	fi
+
+}
+
+main "$@"
 
-echo Installing packages complete.
+echo Installing peasoup packages complete.
-- 
GitLab