forked from mirrors/nixpkgs
* Sort the module list; otherwise the output will be sensitive to the
order in which files are stored in the file system of whoever runs the script (and will therefore fluctuate a lot). svn path=/nixos/branches/modular-nixos/; revision=15753
This commit is contained in:
parent
e6ae383b9b
commit
0109b7e44f
|
@ -6,7 +6,8 @@ usage(){
|
|||
echo 1>&2 "
|
||||
$prog module-dir
|
||||
|
||||
This script generate the index file inside the module directory.
|
||||
This script generates the `module-list.nix' index file inside the
|
||||
module directory.
|
||||
"
|
||||
exit 1
|
||||
}
|
||||
|
@ -34,7 +35,7 @@ generate_index(){
|
|||
cd "$path"
|
||||
echo -n "$path: " 1>&2
|
||||
{ echo "[ # This file have been generated by $(basename $prog)";
|
||||
for file in : $(find ./ -wholename '*.impl[./]*' -or -wholename './module-list.nix' -or -type f -name '*.nix' -print); do
|
||||
for file in : $(find ./ -wholename '*.impl[./]*' -or -wholename './module-list.nix' -or -type f -name '*.nix' -print | sort); do
|
||||
[ "$file" = ':' ] && continue;
|
||||
echo -n . 1>&2
|
||||
if test "$(is_module "$file" 2> /dev/null)" = "Bool(True)"; then
|
||||
|
|
Loading…
Reference in a new issue