From 090c1001ad999deb84b2542718f3689699049ba0 Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@monsoon.(none)>
Date: Sun, 18 Nov 2012 11:13:37 -0500
Subject: [PATCH] improved installer, incorporated Gem as submodule

---
 l2ork_addons/tar_em_up.sh | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/l2ork_addons/tar_em_up.sh b/l2ork_addons/tar_em_up.sh
index a9084388f..eae643dd1 100755
--- a/l2ork_addons/tar_em_up.sh
+++ b/l2ork_addons/tar_em_up.sh
@@ -117,11 +117,20 @@ fi
 if [ $full -gt 0 -o $deb -gt 0 ]
 then
 	echo "Pd full installer..."
-	# update the include files to be safe
-	if [ ! -d "/usr/local/include/pdl2ork" ]; then
-		sudo mkdir /usr/local/include/pdl2ork
+
+	# check if Gem submodule is empty, and if so do first init
+	if [ "$(ls -A Gem)" ]; then
+		git submodule update
+	else
+		git submodule init
+		git submodule update
 	fi
 
+	# update the include files to be safe
+	#if [ ! -d "/usr/local/include/pdl2ork" ]; then
+	#	sudo mkdir /usr/local/include/pdl2ork
+	#fi
+
 	#if [ $full -eq 3 ]
 	#then
 	#	echo "IMPORTANT! If you are already running vanilla Pd or Pd-extended, or have a custom installation of Pd-l2ork at a location other than /usr/local/lib/pd-l2ork, you will want to EITHER uninstall all older versions of Pd-l2ork and/or other versions of pd OR manually pre-install Pd-l2ork includes in order to ensure that any third-party externals that rely on the global Pd-l2ork includes reference the right versions of the said files. Failing to do so may result in incorrectly compiled externals that will definitely crash Pd-l2ork. You can install the includes into their default dir /usr/local/include by typing following commands:"
-- 
GitLab