You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1001 B
45 lines
1001 B
#! /bin/bash
|
|
# Author: Nils Gerstner
|
|
# Last revision: 30. December 2018
|
|
# Version: v1
|
|
# Description:
|
|
|
|
function _linux() {
|
|
# Put your Linux related code here
|
|
}
|
|
|
|
function _mac() {
|
|
# Put your Mac related code here
|
|
}
|
|
|
|
function _cmsg {
|
|
# Print colored messages
|
|
# _cmsg color "message"
|
|
case "$1" in
|
|
black) COLOR="\033[0;30m" ;;
|
|
white) COLOR="\033[1;37m" ;;
|
|
grey) COLOR="\033[1;30m" ;;
|
|
lgrey) COLOR="\033[0;37m" ;;
|
|
red) COLOR="\033[0;31m" ;;
|
|
lred) COLOR="\033[1;31m" ;;
|
|
green) COLOR="\033[0;32m" ;;
|
|
lgreen) COLOR="\033[1;32m" ;;
|
|
brown) COLOR="\033[0;33m" ;;
|
|
yelow) COLOR="\033[1;33m" ;;
|
|
blue) COLOR="\033[0;34m" ;;
|
|
lblue) COLOR="\033[1;34m" ;;
|
|
purple) COLOR="\033[0;35m" ;;
|
|
lpurple) COLOR="\033[1;35m" ;;
|
|
cyan) COLOR="\033[0;36m" ;;
|
|
lcyan) COLOR="\033[1;36m" ;;
|
|
nocolor) COLOR="\033[0m" ;;
|
|
esac
|
|
printf "${COLOR}${2}\33[0m\n"
|
|
}
|
|
|
|
case "$(uname -s)" in
|
|
Linux*) _linux ;;
|
|
Darwin*) _mac ;;
|
|
*) _cmsg -red "Unknown System\nDo nothing!"
|
|
esac
|