• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Experimental package creation tool for MinGW.org


Commit MetaInfo

Revision3db4e23bf4020caa9ff6bfb00f702b05195e0a97 (tree)
Time2022-03-13 05:04:37
AuthorKeith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Optimize program configuration procedure.

* src/modules/config.sh (/etc/mingw-pkg/*.sh): New configuration
script source; process matching scripts before, but together with...
($HOME/.mingw-pkgrc, .mingw-pkg/*.sh): ...these, as previously, but
now incorporating all within the scope of a single "for" loop.

Change Summary

Incremental Difference

--- a/src/modules/config.sh
+++ b/src/modules/config.sh
@@ -8,7 +8,7 @@
88 # $Id$
99 #
1010 # Written by Keith Marshall <keith@users.osdn.me>
11-# Copyright (C) 2011, 2013, 2017, 2018, 2020, MinGW.OSDN Project
11+# Copyright (C) 2011, 2013, 2017, 2018, 2020, 2022, MinGW.OSDN Project
1212 #
1313 # Permission is hereby granted, free of charge, to any person obtaining a copy
1414 # of this software and associated documentation files (the "Software"), to deal
@@ -35,17 +35,14 @@
3535 local name
3636 for name in dmh actions options; do require module $name; done
3737
38-# Accept user specified customisation.
39-#
40- test -f "$HOME/.${cmd}rc" && . "$HOME/.${cmd}rc" || true
41-
42-# Reload any locally saved configuration overrides; if the configuration
43-# directory exists, take care that a failed glob match doesn't lure us into
44-# an attempt to parse a non-existent script named "*.sh".
45-#
46- test -d .$cmd && {
47- for name in .$cmd/*.sh; do test -f "$name" && . "$name"; done
48- } || true
38+# Load system wide configuration options, (if any), apply any user-specified
39+# custom configuration, and reload any locally saved configuration overrides;
40+# for each possible configuration source nomination, take care that a failed
41+# glob match doesn't lure us into an attempt to parse a non-existent script
42+# named "*.sh".
43+#
44+ for name in /etc/$cmd/*.sh "$HOME/.${cmd}rc" .$cmd/*.sh
45+ do test -f "$name" && . "$name"; done || true
4946 #
5047 # -----------------------------------------------------------------------------
5148 # $RCSfile$: end of file