X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=32a2c66212893c101c8e7c57670f5486a6f613c8;hb=refs%2Fheads%2Fmaster;hp=0745bffee49d2a6f66e484064cee697bb914cff6;hpb=ca61084446e48fb0703ce2a203c1bd18ceaf4dfb;p=distro-setup diff --git a/brc b/brc index 0745bff..222e0f8 100644 --- a/brc +++ b/brc @@ -354,6 +354,7 @@ mysrc() { mysrc /a/bin/small-misc-bash/ll-function mysrc /a/bin/distro-functions/src/package-manager-abstractions +mysrc /a/bin/fai/fai/config/distro-install-common/bash-misc-funcs # things to remember: # ALT-C - cd into the selected directory @@ -2964,33 +2965,6 @@ nonet() { m() { printf "%s\n" "$*"; "$@"; } m2() { printf "%s\n" "$*" >&2; "$@"; } -# update file. note: duplicated in mail-setup. -# updates $ur u result to true or false -# updates $reload to true if file updated is in /etc/systemd/system -u() { - local tmp tmpdir dest="$1" - local base="${dest##*/}" - local dir="${dest%/*}" - if [[ $dir != "$base" ]]; then - # dest has a directory component - mkdir -p "$dir" - fi - # shellcheck disable=SC2034 # see comment at top of function - ur=false # u result - tmpdir="$(mktemp -d)" - cat >$tmpdir/"$base" - tmp=$(rsync -ic $tmpdir/"$base" "$dest") - if [[ $tmp ]]; then - printf "%s\n" "$tmp" - # shellcheck disable=SC2034 # see comment at top of function - ur=true - if [[ $dest == /etc/systemd/system/* ]]; then - # shellcheck disable=SC2034 # see comment at top of function - reload=true - fi - fi - rm -rf $tmpdir -} uptime() { @@ -3403,7 +3377,8 @@ if [[ $- == *i* ]]; then # titelbar below #echo -ne "$_title_escape $HOSTNAME ${PWD/#$HOME/~} \007" - if [[ $KONSOLE_VERSION ]]; then + # version 211203 does not have this feature. + if [[ $KONSOLE_VERSION && $KONSOLE_VERSION == [3456789]* || $KONSOLE_VERSION == 2[2456789]* ]]; then # from konsole, output via ctrl-alt-] if [[ ! $PS1 =~ 133 ]] ; then PS1='\[\e]133;L\a\]\[\e]133;D;$?\]\[\e]133;A\a\]'$PS1'\[\e]133;B\a\]' ;