Everywhere: Remove everything non-essential for "make clean all"

This commit removes everything not strictly necessary for running
"make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725
lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

   The decision should be based on whether or not jw-build can also be
   useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-14 15:02:56 +01:00
commit bc883deed4
199 changed files with 0 additions and 18851 deletions

View file

@ -1,81 +0,0 @@
#!/bin/bash
usage()
{
cat <<-EOT
usage $myname [-e sed-extract-command] [-m module] file.py ...
EOT
[ "$1" ] && exit $1
}
module_path()
{
if [ "$module" ]; then
echo $module.$1
return
fi
echo $1
}
cmd_create_init()
{
local import_submodules=0
local e f files base extracted module_path
local del="-------------------------- generated by $myname"
echo "# >> $del >>"
echo "from pkgutil import extend_path"
echo "from typing import Iterable"
echo "__path__ = extend_path(__path__, __name__) # type: ignore" # was "type Iterable[str]"
files="$*"
for f in $files; do
test -d $f && continue
base=${f##*/}
base=${base%.py}
if [ "$sed_extract_command" ]; then
#echo running $sed_extract_command on $f
extracted=`sed "$sed_extract_command" $f`
#extracted="$sed_extract_command"
for e in $extracted; do
echo "from `module_path $base` import $e"
done
fi
done
if [ "$import_submodules" = 1 ]; then
for f in $files; do
[ -f $f/__init__.py ] && echo "import `module_path $f` as $f"
done
fi
echo "# << $del <<"
}
# --------------------- here we go
myname=`basename $0`
eval set -- `getopt -o 'he:m:' "$@"`
while [ "$1" != -- ]; do
case $1 in
-e)
sed_extract_command="$2"
shift
;;
-m)
module=$2
shift
;;
-h)
usage 0;;
*)
echo unknown argument $1
usage 1;;
esac
shift
done
shift
cmd=cmd_${1//-/_}
shift
eval $cmd $*