git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md31
-rw-r--r--README.md3
-rw-r--r--issues/arch.issue2
-rwxr-xr-xissues/display76
-rw-r--r--issues/issue.blank.1 (renamed from issues/issue.blank)0
-rw-r--r--issues/issue.blank.24
-rw-r--r--issues/redhat-bg.issue17
-rw-r--r--issues/redhat.issue17
-rw-r--r--issues/suse.issue20
9 files changed, 153 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..03eb779
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,31 @@
+## [1.0.0]
+
+### Features
+
+- 05dfc83b39bbceaf055cc1f48a8cb53cb90638ce Add red hat issue with background colouring
+
+### Other
+
+- 92a9a968ce5d8d7c0cabee3ca8d65313183d822e +InComm
+- 5dd71801ae82e9c01ebb1a57ebafbacc1fec8185 +oi, unchecked
+- f7d15d968018c5b0700e245cac46ad222a7e5838 Meh
+- b6e282cf07908a80a4abbfb22116a53e04babc57 Fin
+- cdb28e300dbe0a00fcd12350c59bf0be36e462d6 +hetzner
+- 5b8462dd58bedc1fa70080bbc6342dbc4262a4f9 +ubuntu
+- 01abe525cbe2b0a58856988d2dc3bde25f684268 +display
+- e0c2abe8776f2d128636bf2561c4389bf145cceb Display without figlet
+- 308085cd093c0330670d3922bb2634a20fba3571 Colour correction for console
+- f7414a8e8db17bbabafa2b3865894f93b5009a0b Colour correction for console [2]
+- 1543ab388aadb367ab874c8612938bba8fb54b50 Red line corrected
+- eab591bb20da0328df1f64dddb670de555b2a422 Yellow left area corrected
+- f9c5eedea88137604748488924292738186bf07e +blank
+- 7348f482cb90e885f1f45222acf07ca741a3cf72 Blah
+- f2366ba476f715a1276b5af73a34c359ddaf8aca InComm fedora. hard to get the blues...
+- c704c978d4d928ac01051420d9a562ff1187615f Prompt like original, but with \S
+- 1a66c58323be708f5a4567839e0ac6b46f257bbe Arch colour according to live/rescue motd
+- 924d738dd7d2c6ffdec0ea57c7e0ab366a1019f6 Typo in display
+- 8b27f7e2427fc925bbe9b57c6c0ff7b6d96dbb49 More recent issue.blank iteration
+- 46736fb4efe522231388f7cc45b1b58172e32e01 Include the issue.blank iterations in display demo
+- 2fbca31f69c1628a14d34852175e996d365a3c28 Fake real information in display demo from running system
+- f4c0a77fe860d82ac5412ec25eac51c582b00f5d 1st version of suse+geeko
+- 9e9fca4a0a194f4de6d8ddf93f4057df65929bde InComm of Red Hat issue
diff --git a/README.md b/README.md
index c048c33..d22f645 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,8 @@ And you can still continue to cheat yourself by putting whatever text inside. Le
Or try something meaningful instead.
-## issue.blank
+## issue.blank.*
Contains no logo, but some strings I use e.g. for VMs to have individual base information at a glance.
More dedicated systems like hypervisors bear less information in the issue.
+issue.blank.2 is the more recent one.
diff --git a/issues/arch.issue b/issues/arch.issue
index f099f9d..e6af458 100644
--- a/issues/arch.issue
+++ b/issues/arch.issue
@@ -1,4 +1,4 @@
-\e[036m .
+\e[38;2;23;147;209m .
c;
:oo,
;lool'
diff --git a/issues/display b/issues/display
index 0a19d43..70f9dca 100755
--- a/issues/display
+++ b/issues/display
@@ -1,24 +1,70 @@
#!/usr/bin/env bash
+
+MYTDIR="$(mktemp -d --tmpdir osissue.XXXXXX)" || exit 1
+MYPWD="$(cd "$(dirname "$0")" && pwd)" || exit 2
+function ctrl_c {
+ if [ ! -z "$MYTDIR" ]; then
+ rm -rf "$MYTDIR"
+ fi
+ exit 130
+}
if [ -n "$1" ];then
FARR="$1"
if [ ! -e "$FARR" ];then FARR="$FARR.issue";fi
else
IFS=$'\n'
- FARR=( $(ls *.issue) )
+ FARR=( $(ls *.issue) "issue.blank.1" "issue.blank.2" )
unset IFS
fi
-for i in "${FARR[@]}";do
- IFS=$'\n'
- FLARR=( $(cat "$i") )
- unset IFS
- if [ -z "$COLUMNS" ];then
- COLUMNS="$(tput cols)"
- [ -z "$COLUMNS"] && COLUMNS=20
+if [ -r "/etc/os-release" ]; then
+ source "/etc/os-release"
+fi
+if [ -n "$VARIABLE" ]; then
+ OSSTR_S="$VARIABLE"
+elif [ -n "$PRETTY_NAME" ]; then
+ OSSTR_S="$PRETTY_NAME"
+else
+ OSSTR_S="$(uname -o)"
+fi
+OSSTR_M="$(uname -m)"
+OSSTR_R="$(uname -r)"
+OSSTR_N="$(uname -n)"
+OSSTR_L="$(tty | sed 's#^/dev/##')"
+# see man:agetty(8), ... kinda: we don't have e.g. 4{IFACENAME} anywhere, so we only do the
+# argumentless variants
+OSSTR_4="$(ip -4 -o address show nomaster primary scope global up | head -n 1 | awk '{print $4}' | awk -F/ '{print $1}')"
+if [ -z "$OSSTR_4" ]; then
+ OSSTR_4="$(getent ahostsv4 "$(hostname -s)" | head -n1 | awk '{print $1}')"
+ if [ -z "$OSSTR_4" ]; then OSSTR_4="127.0.0.1"; fi
+fi
+OSSTR_6="$(ip -6 -o address show nomaster primary scope global up | head -n 1 | awk '{print $4}' | awk -F/ '{print $1}')"
+if [ -z "$OSSTR_6" ]; then
+ OSSTR_6="$(getent ahostsv6 "$(hostname -s)" | head -n1 | awk '{print $1}')"
+ if [ -z "$OSSTR_6" ]; then
+ # this could now be a number of reasons, we act as if IPv6 had been deactivated
+ OSSTR_6="::ffff:127.0.1.1"
fi
- printf "\\033[;1m"
- for ((j=0;j<$COLUMNS;++j)); do printf -- "-"; done
- printf "\\n %b\\n" "$i"
- for ((j=0;j<$COLUMNS;++j)); do printf -- "-"; done
- printf "\\033[0m\\n"
- printf "%b\\n" "${FLARR[@]}"
-done
+fi
+(
+ cd "$MYPWD" || exit 10
+ for issuefile in "${FARR[@]}";do
+ cp -p "$issuefile" "${MYTDIR}/" || break
+ sed -i "s#\\\\S#$OSSTR_S#;s#\\\\m#$OSSTR_M#;s#\\\\l#$OSSTR_L#" "${MYTDIR}/${issuefile}" &&\
+ sed -i "s#\\\\4#$OSSTR_4#;s#\\\\6#$OSSTR_6#" "${MYTDIR}/${issuefile}" &&\
+ sed -i "s#\\\\r#$OSSTR_R#;s#\\\\n#$OSSTR_N#" "${MYTDIR}/${issuefile}" || break
+ IFS=$'\n'
+ FLARR=( $(cat "${MYTDIR}/${issuefile}") )
+ unset IFS
+ if [ -z "$COLUMNS" ];then
+ COLUMNS="$(tput cols)"
+ [ -z "$COLUMNS" ] && COLUMNS=20
+ fi
+ printf "\\033[;1m"
+ for ((j=0;j<$COLUMNS;++j)); do printf -- "-"; done
+ printf "\\n %b\\n" "$issuefile"
+ for ((j=0;j<$COLUMNS;++j)); do printf -- "-"; done
+ printf "\\033[0m\\n"
+ printf "%b\\n" "${FLARR[@]}"
+ done
+)
+rm -rf "$MYTDIR"
diff --git a/issues/issue.blank b/issues/issue.blank.1
index 0699aef..0699aef 100644
--- a/issues/issue.blank
+++ b/issues/issue.blank.1
diff --git a/issues/issue.blank.2 b/issues/issue.blank.2
new file mode 100644
index 0000000..18894a9
--- /dev/null
+++ b/issues/issue.blank.2
@@ -0,0 +1,4 @@
+<SPACE_FOR_LOGO>
+
+\S \r (\l)
+\4 || \6
diff --git a/issues/redhat-bg.issue b/issues/redhat-bg.issue
new file mode 100644
index 0000000..035876f
--- /dev/null
+++ b/issues/redhat-bg.issue
@@ -0,0 +1,17 @@
+\e[38;5;160m \e[48;5;160m'''\e[48;5;0m \e[48;5;160m'''''\e[48;5;0m
+ \e[48;5;160m''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m''''''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m'''''''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m'''''''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m''''\e[48;5;0m \e[48;5;160m'''''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m'''''''\e[48;5;0m \e[48;5;160m'''''''''''''''''\e[48;5;0m
+ \e[48;5;160m'''''''''\e[48;5;0m \e[48;5;160m'''''''''\e[48;5;0m
+ \e[48;5;160m''''''''''\e[48;5;0m \e[48;5;160m'''\e[48;5;0m
+ \e[48;5;160m''''''''''''\e[48;5;0m \e[48;5;160m''''''\e[48;5;0m
+ \e[48;5;160m'''''''''''''''''\e[48;5;0m \e[48;5;160m''''''''''\e[48;5;0m
+ \e[48;5;160m'''''''''''''''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m''''''''''''''''''''''''\e[48;5;0m
+ \e[48;5;160m'''''''''''''\e[0m
+
+\S
+Kernel \r on an \m
diff --git a/issues/redhat.issue b/issues/redhat.issue
new file mode 100644
index 0000000..37bada1
--- /dev/null
+++ b/issues/redhat.issue
@@ -0,0 +1,17 @@
+\e[1m\e[38;5;160m ''' '''''
+ ''''''''''''''''''
+ ''''''''''''''''''''''
+ '''''''''''''''''''''''
+ \e[38;5;0m'''\e[38;5;160m'''''''''''''''''''''''
+ ''''\e[38;5;0m'''''\e[38;5;160m'''''''''''''''''''''
+ '''''''\e[38;5;0m'''''''''\e[38;5;160m'''''''''''''''''
+ '''''''''\e[38;5;0m'''''''''''''\e[38;5;160m'''''''''\e[38;5;0m'''\e[38;5;160m
+ ''''''''''\e[38;5;0m''''''''''''''''''''''''\e[38;5;160m'''
+ ''''''''''''\e[38;5;0m'''''''''''''''''''\e[38;5;160m''''''
+ '''''''''''''''''\e[38;5;0m'''''''\e[38;5;160m''''''''''
+ '''''''''''''''''''''''''''''''
+ ''''''''''''''''''''''''
+ '''''''''''''\e[0m
+
+\S
+Kernel \r on an \m
diff --git a/issues/suse.issue b/issues/suse.issue
new file mode 100644
index 0000000..2d00c37
--- /dev/null
+++ b/issues/suse.issue
@@ -0,0 +1,20 @@
+\e[92m ,;:clllooollc:;,' 'l:'
+ ',:clooooooooooooooooooolc:;, ,oool:;'
+ ';cooooooooooooooooooooooooooooooolc;',ooooooooc;,
+ ':loooooooooooooooooooooooooooooooooooooooooooool;:::;;
+ ,coooooooooooooooooooooooooooooooooooooooooooooool coolc'l
+ 'coooooooolllooooooooooooooooooooooooooooooooooooooc loo,' l:
+ ;oooool;, ';cooooooooooooooooooooooooooooooollol;;;;;col
+,ooool, ''' ;looooooooooooooooooooooooooool;;;::ccccc:
+coool 'clolllol:' ;oooooooooooooooooooooooooooooolccc::;'
+looo: oo: ;oo: 'looooooooooooooooooool,,;;;:::;,,
+:oool lo: :oo, looool''''''',;loooo,
+'oooo: ;: :oo; loooo, ;oool;'
+ 'loool, ':ooo' ;::::::, ':::::;'
+ ;looool::::cloooo;
+ ,:loooooooolc;
+ ';:ccc:,\e[0m
+
+Welcome to \S - Kernel \r (\l).
+
+\4 \6