Skip to content

Commit

Permalink
prefer gnu coreutils
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Jan 8, 2025
1 parent ea2bde7 commit 29c1d26
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ fi
[ "$DISTRO" == "" ] && export DISTRO=$UNAME
unset UNAME

# Prefer gnu over freebsd coreutils
PATH=/opt/local/libexec/gnubin/head:$PATH

export PATH
log_info "Distro : $DISTRO"

help_full()
Expand Down
5 changes: 5 additions & 0 deletions build/format.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash

# Prefer gnu over freebsd coreutils
PATH=/opt/local/libexec/gnubin/head:$PATH
export PATH

for i in *.cpp *.hpp
do
case $i in
Expand Down
6 changes: 5 additions & 1 deletion build/shell_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Use "do" as the first arg if the output looks sane.
#

# Prefer gnu over freebsd coreutils
PATH=/opt/local/libexec/gnubin/head:$PATH
export PATH

PRE=$(mktemp) || exit 1
PAYLOAD=$(mktemp) || exit 1
SHELL=$(mktemp) || exit 1
Expand All @@ -26,7 +30,7 @@ do
continue
fi

sed "1,/begin shell marker${WHICH}/!d" $IN | head -n -1 - > $PRE
sed "1,/begin shell marker${WHICH}/!d" $IN | head -n -1 > $PRE
sed "/begin shell marker${WHICH}/,/end shell marker${WHICH}/!d" $IN | grep "\* shell" | sed -e 's/\/\* shell //g' -e 's/\*\/$//g' > $PAYLOAD
sed "/begin shell marker${WHICH}/,/end shell marker${WHICH}/!d" $IN | grep "shell" | grep -v "end shell marker${WHICH}" > $SHELL
sed "/end shell marker${WHICH}/,\$!d" $IN | tail -n +2 > $POST
Expand Down
4 changes: 4 additions & 0 deletions build/tidy_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# Use "do" as the first arg if the output looks sane.
#

# Prefer gnu over freebsd coreutils
PATH=/opt/local/libexec/gnubin/head:$PATH
export PATH

PRE=$(mktemp) || exit 1
PAYLOAD=$(mktemp) || exit 1
POST=$(mktemp) || exit 1
Expand Down

0 comments on commit 29c1d26

Please sign in to comment.