mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Hinzugefügt:
* Cron-Ordner. * Eine Perl-Datei für den GNUmp3d hinzugefügt. * run-parts-Script. Geändert: * Versucht das QoS kompatibel für den IE zu machen. * Bootsplashbar wird nichtmehr im Textmodus versucht einzublenden. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@217 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
49
src/scripts/run-parts
Normal file
49
src/scripts/run-parts
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
# run-parts: Runs all the scripts found in a directory.
|
||||
|
||||
# keep going when something fails
|
||||
set +e
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: run-parts <directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $1 ]; then
|
||||
echo "Not a directory: $1"
|
||||
echo "Usage: run-parts <directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# There are several types of files that we would like to
|
||||
# ignore automatically, as they are likely to be backups
|
||||
# of other scripts:
|
||||
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
|
||||
|
||||
# Main loop:
|
||||
for SCRIPT in $1/* ; do
|
||||
# If this is not a regular file, skip it:
|
||||
if [ ! -f $SCRIPT ]; then
|
||||
continue
|
||||
fi
|
||||
# Determine if this file should be skipped by suffix:
|
||||
SKIP=false
|
||||
for SUFFIX in $IGNORE_SUFFIXES ; do
|
||||
if [ ! "`basename $SCRIPT $SUFFIX`" = "`basename $SCRIPT`" ]; then
|
||||
SKIP=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$SKIP" = "true" ]; then
|
||||
continue
|
||||
fi
|
||||
# If we've made it this far, then run the script if it's executable:
|
||||
if [ -x $SCRIPT ]; then
|
||||
echo "$SCRIPT:"
|
||||
echo
|
||||
$SCRIPT 2>&1
|
||||
echo
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user