zpkg/compile.sh
zawz ce4bf5ea95 Major rework:
- dependencies
- HOME and ROOT filesystems
2020-03-02 16:39:55 +01:00

24 lines
424 B
Bash
Executable file

#!/bin/sh
# config
# no spaces in srcdir or ordered files
SRCDIR=src
ordered='options.sh config.sh main.sh'
# process
COMMENTSCRIPT="/^\s*#/d;s/\s*#[^\"']*$//"
# order list
unset namefind list
for I in $ordered
do
namefind="$namefind ! -name $I"
list="$list $SRCDIR/$I"
done
findlist=$(find "$SRCDIR" -type f $namefind)
# create file
echo '#!/bin/sh' > zpkg
sed $COMMENTSCRIPT $findlist $list >> zpkg
chmod +x zpkg