Created
November 9, 2020 17:41
-
-
Save iainlane/a6df7f4c8e928fd7d1cccc6bef643211 to your computer and use it in GitHub Desktop.
release_ge shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
distro-info --all | mawk " | |
/^$1\$/ { l = NR }; | |
/^$2\$/ { r = NR }; | |
END { | |
if (!l) { | |
print \"Unknown release $1\" > \"/dev/stderr\"; | |
exit 1; | |
} | |
if (!r) { | |
print \"Unknown release $2\" > \"/dev/stderr\"; | |
exit 1; | |
} | |
if (l >= r) { | |
exit 0 | |
} else { | |
exit 1 | |
} | |
}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment