change.sh (365B)
1 #!/usr/bin/env sh 2 3 [ -z "$1" ] && echo "Usage: ./change.sh [name of file of scheme] (./change nord)" && exit 1 4 5 path="/usr/include" 6 path_opt="/opt/gcolors" 7 8 if [ -f "$path/gcolors/$1.h" ]; then 9 upper="$(echo "$1" | tr '[:lower:]' '[:upper:]')" 10 11 echo "#define $upper" > "$path/gcolors.h" 12 cat "$path_opt/default.h" >> "$path/gcolors.h" 13 else 14 exit 1 15 fi