From: Ian Kelling Date: Thu, 18 Apr 2024 06:28:33 +0000 (-0400) Subject: minor fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=da8b091d08c731d798c522b1cb08e59c48e348cc;p=distro-setup minor fixes --- diff --git a/mount-latest-remote b/mount-latest-remote index 3363311..f63a6f7 100755 --- a/mount-latest-remote +++ b/mount-latest-remote @@ -26,8 +26,8 @@ set -e; . /usr/local/lib/bash-bear; set +e -readonly this_file; this_file="$(readlink -f -- "${BASH_SOURCE[0]}")"; -script_dir=${this_file%/*} +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file script_dir="${this_file%/*}" if (( ! $# )); then echo "mount-latest-remote: error: a host argument" diff --git a/ssh-emacs-setup b/ssh-emacs-setup index b89f2bd..309ab0a 100755 --- a/ssh-emacs-setup +++ b/ssh-emacs-setup @@ -32,7 +32,9 @@ if [[ -s ~/.bashrc ]];then . ~/.bashrc;fi set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR -readonly this_file; this_file="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${this_file%/*} +this_file="$(readlink -f -- "${BASH_SOURCE[0]}")" +readonly this_file this_dir="${this_file%/*}" +cd "$this_dir" # get rid of useless motd stuff sed -i --follow-symlinks 's/^\s*PrintLastLog .*/PrintLastLog no/' /etc/ssh/sshd_config rm -f /etc/update-motd.d/10-help-text /etc/update-motd.d/00-header