Created
February 25, 2020 06:55
-
-
Save unakatsuo/3cbb854a8c620bf91d78775b1de69c0a to your computer and use it in GitHub Desktop.
Switch by /etc/os-release
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 | |
set -e | |
. /etc/os-release | |
case "${ID} ${ID_LIKE}" in | |
*ubuntu*) ;; | |
*debian*) ;; | |
*) | |
echo "Unsupproted distribution ${ID}" >&2 | |
exit 1 | |
;; | |
esac |
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 | |
set -e | |
. /etc/os-release | |
case "${ID} ${ID_LIKE}" in | |
*centos*) ;; | |
*rhel*) ;; | |
*fedora*) ;; | |
*) | |
echo "Unsupproted distribution ${ID}" >&2 | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment