]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/scripts/run-parts
2 # run-parts: Runs all the scripts found in a directory.
4 # keep going when something fails
8 echo "Usage: run-parts <directory>"
13 echo "Not a directory: $1"
14 echo "Usage: run-parts <directory>"
18 # There are several types of files that we would like to
19 # ignore automatically, as they are likely to be backups
21 IGNORE_SUFFIXES
="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
24 for SCRIPT
in $1/* ; do
25 # If this is not a regular file, skip it:
26 if [ ! -f $SCRIPT ]; then
29 # Determine if this file should be skipped by suffix:
31 for SUFFIX
in $IGNORE_SUFFIXES ; do
32 if [ ! "`basename $SCRIPT $SUFFIX`" = "`basename $SCRIPT`" ]; then
37 if [ "$SKIP" = "true" ]; then
40 # If we've made it this far, then run the script if it's executable:
41 if [ -x $SCRIPT ]; then