You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
2 years ago
|
#!/bin/bash
|
||
|
#
|
||
|
# This script is for listing the EXTRA_DIST value in Makefile.am
|
||
|
#
|
||
|
# Note: the build output directory (out/ at the time of writing) should be
|
||
|
# replaced by the corresponding variable set in the Makefile (currently
|
||
|
# "nextoutdir").
|
||
|
#
|
||
|
# The find command:
|
||
|
# * ignores node_modules/ directory,
|
||
|
# * ignores git related files,
|
||
|
# * ignores husky related files,
|
||
|
# * ignores public/ directoy,
|
||
|
# * ignores make related files,
|
||
|
# * ignores environment-specific dot env files,
|
||
|
# * ignores this script,
|
||
|
# * ignores auto-generated .next/
|
||
|
# and
|
||
|
# * removes leading "./" and append "\"
|
||
|
|
||
|
found=$(find . \
|
||
|
-mindepth 1 -maxdepth 1 \
|
||
|
-not \( -name node_modules -prune \) \
|
||
|
-not \( -name *git* -prune \) \
|
||
|
-not \( -name *husky* -prune \) \
|
||
|
-not \( -name public -prune \) \
|
||
|
-not \( -name *[Mm]ake* -prune \) \
|
||
|
-not \( -name [.]env[.]* -prune \) \
|
||
|
-not \( -name "*$(basename ${BASH_SOURCE[0]})*" -prune \) \
|
||
|
-not \( -name ".next" -prune \) \
|
||
|
| sed -E 's@^./(.+)$@\1 \\@')
|
||
|
|
||
|
sorted=$(sort <<< "$found")
|
||
|
|
||
|
echo "${sorted::-1}"
|
||
|
echo "lines: $(wc -l <<< "$found")"
|
||
|
|