appending main.sh at end

This commit is contained in:
a-sansara 2017-04-30 02:04:46 +02:00
parent e79a367f9d
commit 68abf31b41
2 changed files with 16 additions and 4 deletions

6
dist/bes-build vendored
View File

@ -108,9 +108,15 @@ if [ -d "$APP_DIR/src" ]; then
echo "#!/bin/bash" > $APP_BIN echo "#!/bin/bash" > $APP_BIN
bes.echo.action "reading ${Coff}src/" bes.echo.action "reading ${Coff}src/"
for entry in "$APP_DIR/src"/*.sh; do for entry in "$APP_DIR/src"/*.sh; do
if [ "$(basename $entry)" != "main.sh" ]; then
bes.echo " - appending ${Coff}src/$(basename $entry)" bes.echo " - appending ${Coff}src/$(basename $entry)"
tail -n +2 "$entry" >> "$APP_BIN" tail -n +2 "$entry" >> "$APP_BIN"
fi
done done
if [ -f "$APP_DIR/src/main.sh" ]; then
tail -n +2 "$APP_DIR/src/main.sh" >> "$APP_BIN"
bes.echo " - appending ${Coff}src/main.sh"
fi
bes.echo.state 0 bes.echo.state 0
bes.echo.action "set execution mode" bes.echo.action "set execution mode"
chmod +x $APP_BIN chmod +x $APP_BIN

View File

@ -25,9 +25,15 @@ if [ -d "$APP_DIR/src" ]; then
echo "#!/bin/bash" > $APP_BIN echo "#!/bin/bash" > $APP_BIN
bes.echo.action "reading ${Coff}src/" bes.echo.action "reading ${Coff}src/"
for entry in "$APP_DIR/src"/*.sh; do for entry in "$APP_DIR/src"/*.sh; do
if [ "$(basename $entry)" != "main.sh" ]; then
bes.echo " - appending ${Coff}src/$(basename $entry)" bes.echo " - appending ${Coff}src/$(basename $entry)"
tail -n +2 "$entry" >> "$APP_BIN" tail -n +2 "$entry" >> "$APP_BIN"
fi
done done
if [ -f "$APP_DIR/src/main.sh" ]; then
tail -n +2 "$APP_DIR/src/main.sh" >> "$APP_BIN"
bes.echo " - appending ${Coff}src/main.sh"
fi
bes.echo.state 0 bes.echo.state 0
bes.echo.action "set execution mode" bes.echo.action "set execution mode"
chmod +x $APP_BIN chmod +x $APP_BIN