Skip to content

Commit

Permalink
Output only one shebang line
Browse files Browse the repository at this point in the history
  • Loading branch information
merces committed Nov 27, 2024
1 parent ae19695 commit 8326146
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
SRC = `find src/ -type f -name '*.sh'|LC_ALL=C sort`
SRC = `find src/ -type f -name 'bh_*.sh' | LC_ALL=C sort`
OUTFILE = bashacks.sh
BASHRCFILE = ~/.profile
BASHACKS = `pwd`/$(OUTFILE)

all:
>$(OUTFILE)
cat src/internal/bootstrap.sh > $(OUTFILE)
for file in $(SRC); do \
(echo '#!/bin/bash' && cat $$file) >> $(OUTFILE); \
cat $$file >> $(OUTFILE); \
echo >> $(OUTFILE); \
done
tr -d \\r < $(OUTFILE) > $(OUTFILE).tmp
Expand Down

0 comments on commit 8326146

Please sign in to comment.