}
InstallOpenSRFfromGit () {
-OSRF_REPODIR=$(echo $OSRF_GIT_URL | awk -F/ '{print $NF}' | sed -e 's/.git%//')
-DISTRONAME=ubuntu-xenial
+OSRF_REPODIR=$(echo $OSRF_GIT_URL | awk -F/ '{print $NF}' | sed -e 's/.git//')
+DISTRONAME="$(lsb_release -si | tr [:upper:] [:lower:])-$(lsb_release -sc | tr [:upper:] [:lower:])"
useradd -m -s /bin/bash opensrf
-su - opensrf -c git clone --branch $OSRF_GIT_BRANCH $OSRF_GIT_URL
+su - opensrf -c "git clone $OSRF_GIT_URL"
+su - opensrf -c "git checkout $OSRF_GIT_BRANCH"
cd /home/opensrf/$OSRF_REPODIR
make -f src/extras/Makefile.install $DISTRONAME
su - opensrf -c "cd $OSRF_REPODIR && autoreconf -i && ./configure --prefix=/openils --sysconfdir=/openils/conf && make"
}
InstallEvergreenfromGit () {
-EG_REPODIR=$(echo $EG_GIT_URL | awk -F/ '{print $NF}' | sed -e 's/.git%//')
-DISTRONAME=ubuntu-xenial
-su - opensrf -c git clone --branch $EG_GIT_BRANCH $EG_GIT_URL
+EG_REPODIR=$(echo $EG_GIT_URL | awk -F/ '{print $NF}' | sed -e 's/.git//')
+DISTRONAME="$(lsb_release -si | tr [:upper:] [:lower:])-$(lsb_release -sc | tr [:upper:] [:lower:])"
+su - opensrf -c "git clone $EG_GIT_URL"
+su - opensrf -c "git checkout $EG_GIT_BRANCH"
cd /home/opensrf/$EG_REPODIR
-make -f src/extras/Makefile.install $DISTRONAME
-make -f src/extras/Makefile.install ${DISTRONAME}-developer
+make -f Open-ILS/src/extras/Makefile.install $DISTRONAME
+make -f Open-ILS/src/extras/Makefile.install ${DISTRONAME}-developer
su - opensrf -c "cd $EG_REPODIR/Open-ILS/web/js/ui/default/staff && npm install && npm run build-prod && npm run test"
su - opensrf -c "cd $EG_REPODIR/Open-ILS/src/eg2 && npm install && ng build --prod && npm run test"
su - opensrf -c "cd $EG_REPODIR && autoreconf -i && ./configure --prefix=/openils --sysconfdir=/openils/conf && make"