From 4c82d507dab53f4ed7f33c7e342289277eaf2d1d Mon Sep 17 00:00:00 2001 From: Timothy Lebo <timrdf@gmail.com> Date: Tue, 17 Jan 2012 19:42:59 -0500 Subject: [PATCH] soft link from another lodspeakr --- utils/link-components.sh | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 utils/link-components.sh diff --git a/utils/link-components.sh b/utils/link-components.sh new file mode 100755 index 00000000..ba594c9f --- /dev/null +++ b/utils/link-components.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# +# Script to borrow essential bits from another lodspeakr. +# Desired when lodspeakr essentials are maintained in a project-specfic repository. +# Contributed by Tim Lebo when trying to apply lodspeakr for DataFAQs. + +if [ $# -lt 1 ]; then + echo "usage: `basename $0` other-lodspeakr-directory" + exit 1 +fi + +if [ ! -d $otherDir ]; then + echo "$otherDir does not exist." + exit 1 +fi + +if [[ ! -e settings.inc.php && -e $otherDir/settings.inc.php ]]; then + echo ln -s $otherDir/settings.inc.phpl settings.inc.php + ln -s $otherDir/settings.inc.phpl settings.inc.php +else + echo "WARNING: not linking settings.inc.phpl because it exists." +fi + +if [[ ! -e .htaccess && -e $otherDir/.htaccess ]]; then + echo ln -s $otherDir/models models + ln -s $otherDir/models models +else + echo "WARNING: not linking models/ because it exists." +fi + +if [[ ! -e models && -e $otherDir/models ]]; then + echo ln -s $otherDir/models models + ln -s $otherDir/models models +else + echo "WARNING: not linking models/ because it exists." +fi + +if [[ ! -e views && -e $otherDir/views ]]; then + echo ln -s $otherDir/views views + ln -s $otherDir/views views +else + echo "WARNING: not linking views/ because it exists." +fi -- GitLab