From: Elliott Hughes Date: Wed, 24 Dec 2014 01:17:13 +0000 (-0600) Subject: those of us who need to check in generated files find that 'tr' and X-Git-Tag: upstream/0.5.2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=627cd0f0d974e9ba25d95cb8f5e23ac6c9c93aaf;p=platform%2Fupstream%2Ftoybox.git those of us who need to check in generated files find that 'tr' and 'traceroute' keep swapping places. self-inflicted, yes, but not much i can do about it :-( --- diff --git a/scripts/make.sh b/scripts/make.sh index df74011..1cbe5e0 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -49,7 +49,7 @@ then echo "USE_TOYBOX(NEWTOY(toybox, NULL, TOYFLAG_STAYROOT))" > generated/newtoys.h sed -n -e 's/^USE_[A-Z0-9_]*(/&/p' toys/*/*.c \ - | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -k 1,1 \ + | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -s -k 1,1 \ | sed 's/[^ ]* //' >> generated/newtoys.h && sed -n -e 's/.*(NEWTOY(\([^,]*\), *\(\("[^"]*"[^,]*\)*\),.*/#define OPTSTR_\1\t\2/p' \ generated/newtoys.h > generated/oldtoys.h || exit 1 @@ -173,7 +173,7 @@ do # If no pair (because command's disabled in config), use " " for flags # so allflags can define the appropriate zero macros. -done | sort | sed -n 's/ A / /;t pair;h;s/\([^ ]*\).*/\1 " "/;x;b single;:pair;h;n;:single;s/[^ ]* B //;H;g;s/\n/ /;p' |\ +done | sort -s | sed -n 's/ A / /;t pair;h;s/\([^ ]*\).*/\1 " "/;x;b single;:pair;h;n;:single;s/[^ ]* B //;H;g;s/\n/ /;p' |\ generated/mkflags > generated/flags.h || exit 1 # Extract global structure definitions and flag definitions from toys/*/*.c