mirror of
git://slackware.nl/current.git
synced 2024-12-30 10:24:23 +01:00
9664bee729
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
46 lines
1 KiB
Bash
46 lines
1 KiB
Bash
#!/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
|
|
$SCRIPT || echo "$SCRIPT failed."
|
|
fi
|
|
done
|
|
|
|
exit 0
|