Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/github/pr/13'
Browse files Browse the repository at this point in the history
  • Loading branch information
mika committed Sep 14, 2023
2 parents 1a7c49a + 6015780 commit c9662c3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ CONFIG_DEBS='yes' # check for bootoption debs for installing .debs
CONFIG_DISPLAY_SSH_FINGERPRINTS='yes' # display SSH server key fingerprints
CONFIG_DISTRI='yes' # support some customization via bootoption distri
CONFIG_DMRAID='yes' # support for dmraid
CONFIG_EASTEREGG='yes' # easteregg
CONFIG_EXTRACT='yes' # specify which (only in combination with bootparam myconfig/netconfig useful)
CONFIG_FINDDCSDIR='yes' # search for a debs, config, scripts directory
CONFIG_HOMEDIR='yes' # check for persistent homedir option
Expand Down
27 changes: 27 additions & 0 deletions autoconfig.functions
Original file line number Diff line number Diff line change
Expand Up @@ -1992,5 +1992,32 @@ fi
}
# }}}

# {{{ Easteregg (for 20 years grml.org)
config_easteregg() {
current_date=$(date +%Y-%m-%d)
birthday="2023-09-16"
one_month_later=$(date -d "${current_date} + 1 month" +%Y-%m-%d)

einfo "You found the birthday easter egg!" ; eend 0

# nothing to be done if it's more than one month since $birthday
if ! [[ "${current_date}" == "${birthday}" || "${current_date}" == "${one_month_later}" ]]; then
return 0
fi

if [[ -x /bin/toilet && -x /usr/games/lolcat ]] ; then
visualize() { printf "%s\n" "$*" | toilet | /usr/games/lolcat ; }
elif [[ -x /bin/toilet ]] ; then
visualize() { printf "%s\n" "$*" | toilet ; }
else
visualize() { printf "%s\n" "$*" ; }
fi

visualize " \o/ "
visualize "20 years"
visualize "grml.org"
}
# }}}

## END OF FILE #################################################################
# vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=2
2 changes: 2 additions & 0 deletions grml-autoconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ checkvalue $CONFIG_BLANKING && config_blanking
checkvalue $CONFIG_DEBOOTSTRAP && config_debootstrap

checkvalue $CONFIG_XSTARTUP && config_x_startup

checkvalue $CONFIG_EASTEREGG && config_easteregg
# }}}

# {{{ Re-enable signals
Expand Down

0 comments on commit c9662c3

Please sign in to comment.