summaryrefslogtreecommitdiffstats
path: root/collab/yafm/PRE_INSTALL
diff options
context:
space:
mode:
Diffstat (limited to 'collab/yafm/PRE_INSTALL')
-rwxr-xr-xcollab/yafm/PRE_INSTALL8
1 files changed, 8 insertions, 0 deletions
diff --git a/collab/yafm/PRE_INSTALL b/collab/yafm/PRE_INSTALL
new file mode 100755
index 0000000000..d28537ee98
--- /dev/null
+++ b/collab/yafm/PRE_INSTALL
@@ -0,0 +1,8 @@
+OLD_SCRIPT="$INSTALL_ROOT/usr/share/www/$SPELL/cgi-bin/$SPELL.php" &&
+if [[ -f "$OLD_SCRIPT" ]]; then
+ # sorcery will leave this file undispelled if it was modified
+ # we need to save these modifications
+ BACKUP_SCRIPT="$OLD_SCRIPT.$(date +%Y%m%dT%H%M%S)" &&
+ message "${MESSAGE_COLOR}Old script renamed to \`$BACKUP_SCRIPT'${DEFAULT_COLOR}"
+ mv "$OLD_SCRIPT" "$BACKUP_SCRIPT"
+fi