Last change
on this file since 77578e8 was 8fd0675f, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
Update files with /bin/sh shebang and an extra space
|
-
Property mode
set to
100755
|
File size:
819 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # SPDX-FileCopyrightText: 2021 Jiri Svoboda
|
---|
4 | # SPDX-FileCopyrightText: 2019 Jiří Zárevúcky
|
---|
5 | #
|
---|
6 | # SPDX-License-Identifier: BSD-3-Clause
|
---|
7 | #
|
---|
8 |
|
---|
9 | # Find out the path to the script.
|
---|
10 | SOURCE_DIR=`which -- "$0" 2>/dev/null`
|
---|
11 | # Maybe we are running bash.
|
---|
12 | [ -z "$SOURCE_DIR" ] && SOURCE_DIR=`which -- "$BASH_SOURCE"`
|
---|
13 | [ -z "$SOURCE_DIR" ] && exit 1
|
---|
14 | SOURCE_DIR=`dirname -- "$SOURCE_DIR"`
|
---|
15 | SOURCE_DIR=`cd $SOURCE_DIR && cd .. && echo $PWD`
|
---|
16 |
|
---|
17 | CONFIG_DEFAULTS="${SOURCE_DIR}/defaults"
|
---|
18 |
|
---|
19 | # Find the leaf subdirectories in the defaults directory.
|
---|
20 | level1dirs=`ls "$CONFIG_DEFAULTS"`
|
---|
21 | for dname in $level1dirs; do
|
---|
22 | l2dirs=`ls "$CONFIG_DEFAULTS"/"$dname"`
|
---|
23 | havel2=
|
---|
24 | for dn in $l2dirs; do
|
---|
25 | if [ -d "$CONFIG_DEFAULTS/$dname/$dn" ]; then
|
---|
26 | echo "$dname/$dn"
|
---|
27 | havel2=true
|
---|
28 | fi
|
---|
29 | done
|
---|
30 | if [ -z "$havel2" ]; then
|
---|
31 | echo "$dname"
|
---|
32 | fi
|
---|
33 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.