Commit b963e9bf authored by Michael Shigorin's avatar Michael Shigorin Committed by Anton Midyukov

bin/archdep-filter: cosmetic cleanups

"-a arch" is not requisite either; and having bunches of empty lines in the resulting pkglists that are user visible at least within the conventional installer's alterator-pkg (groups selection) module wouldn't be nice. I chose to sacrifice empty-line separators for clarity; the really good cleanup would save *single* empty lines between chunks of non-empty ones (not at the pkglist's start or end); feel free to implement that as well.
parent 1b5b309b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# filter stdin or file for words related to # filter stdin or file for words related to
# the specified target architecture # the specified target architecture
# #
# args: -a arch [-i file] # args: [-a arch] [-i file]
if [ "$1" = "-a" -a -n "$2" ]; then if [ "$1" = "-a" -a -n "$2" ]; then
a="$2" a="$2"
...@@ -43,7 +43,7 @@ sed -rn "s/\<([^@ ]*)\>|\<([^@ ]*)@$a\>[^ ]*\>/\1\2/pg" | ...@@ -43,7 +43,7 @@ sed -rn "s/\<([^@ ]*)\>|\<([^@ ]*)@$a\>[^ ]*\>/\1\2/pg" |
sed -rn "s/\<([^@ ]*)\>|\<[^ ]*@\!$a\>[^ ]*\> */\1/pg" | sed -rn "s/\<([^@ ]*)\>|\<[^ ]*@\!$a\>[^ ]*\> */\1/pg" |
sed -r "s/\<([^@ ]*)@\![^ ]+\>/\1/g" | sed -r "s/\<([^@ ]*)@\![^ ]+\>/\1/g" |
sed -r "s/\<([^@ ]*)@[^@ ]+\> *//g" | sed -r "s/\<([^@ ]*)@[^@ ]+\> *//g" |
sed -r "s/^ +//;s/ +$//" | sed -r "s/^ +//;s/ +$//;/^$/d" |
if [ -n "$f" ]; then if [ -n "$f" ]; then
cat > "$t" && mv "$t" "$f" cat > "$t" && mv "$t" "$f"
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment