If you are using globbing for file
names (I assume you are, if you use them sorted by names), you can
try to play with
GLOBIGNORE variable.On 04/20/2013 07:56 PM, adrelanos wrote:
I have a folder with chroot scripts. (Scripts which are run inside a
chrooted environment.) Those are run with run-parts, which is awesome,
because their execution is sorted by name.
Some names include:
For debug builds, I'd like to skip some of the less important chroot
scripts. I thought, if I could make some kind of build configuration,
that'd be nice. Such as
if [ "$OWN_FILENAME" = "0" ];
true "INFO: Skipping $OWN_FILENAME, because $OWN_FILENAME is set to 0."
This doesn't work, because bash doesn't accept variable names starting
Ok, another idea...
for setting in "address@hidden"; do
if [ "$setting" = "$OWN_FILENAME" ]; then
true "INFO: Skipping $OWN_FILENAME, because $OWN_FILENAME is set
This doesn't work either, because according to man bash, it does not
(yet) support exporting arrays.
So I told you now, what I'd like to do and what I tried already. I am
looking for some generic code to deactivate chosen scripts by name.
(Setting some SKIP_UPDATE_COMMAND_NOT_FOUND would work, but it's not
generic.) How could I best allow deactivating any chroot script based on
variables set outside and the filename alone?