#!/bin/sh # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: misc/tail/install_postinstall.in # Copyright (C) 2007 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- tail_postinstall_wrapper=rock_substitute auto_install_postinstall() { local pitpl= pidir=$root/var/adm/postinstall mkdir -p $pidir for file in $( ls -1d $confdir/*.postinstall 2> /dev/null ) \ $( ls -1d $base/target/$target/${pkg}.postinstall 2> /dev/null ); do pitpl="${file##*/}"; echo "Installing ${pitpl%.postinstall} postinstall script..." eval "cat $file | \ ${tail_postinstall_wrapper//|/ | } \ > $pidir/${pitpl%.postinstall}" chmod +x $pidir/${pitpl%.postinstall} done } hook_add postinstall 4 'auto_install_postinstall'