2023-01-30

This commit is contained in:
Ismo Vuorinen
2023-01-30 12:16:20 +02:00
parent 9ba66c7734
commit 16d455a262
6 changed files with 34 additions and 26 deletions

View File

@@ -9,7 +9,7 @@
# env VERBOSE=1 sh install-dotfiles.sh
#
# DO NOT EDIT THIS FILE
#
#
# This file is generated by rcm(7) as:
#
# rcup -B 0 -g
@@ -22,14 +22,12 @@
: ${MKDIR:=/bin/mkdir}
: ${RM:=/bin/rm}
: ${DIRNAME:=/usr/bin/dirname}
verbose()
{
verbose() {
if [ "$VERBOSE" -gt 0 ]; then
echo "$@"
fi
}
handle_file_cp()
{
handle_file_cp() {
if [ -e "$2" ]; then
printf "%s " "overwrite $2? [yN]"
read overwrite
@@ -47,8 +45,7 @@ handle_file_cp()
$MKDIR -p "$($DIRNAME "$2")"
$CP -R "$1" "$2"
}
handle_file_ln()
{
handle_file_ln() {
if [ -e "$2" ]; then
printf "%s " "overwrite $2? [yN]"
read overwrite
@@ -86,9 +83,9 @@ handle_file_ln "$HOME/.dotfiles/local/bin/antigen.zsh" "$HOME/.local/bin/antigen
handle_file_ln "$HOME/.dotfiles/local/bin/dfm" "$HOME/.local/bin/dfm"
handle_file_ln "$HOME/.dotfiles/local/bin/git-dirty" "$HOME/.local/bin/git-dirty"
handle_file_ln "$HOME/.dotfiles/local/bin/x-check-git-attributes" "$HOME/.local/bin/x-check-git-attributes"
handle_file_ln "$HOME/.dotfiles/local/bin/x-dupes" "$HOME/.local/bin/x-dupes"
handle_file_ln "$HOME/.dotfiles/local/bin/x-dupes.pl" "$HOME/.local/bin/x-dupes.pl"
handle_file_ln "$HOME/.dotfiles/local/bin/x-foreach" "$HOME/.local/bin/x-foreach"
handle_file_ln "$HOME/.dotfiles/local/bin/x-multi-ping" "$HOME/.local/bin/x-multi-ping"
handle_file_ln "$HOME/.dotfiles/local/bin/x-multi-ping.pl" "$HOME/.local/bin/x-multi-ping.pl"
handle_file_ln "$HOME/.dotfiles/local/bin/x-open-ports" "$HOME/.local/bin/x-open-ports"
handle_file_ln "$HOME/.dotfiles/local/bin/x-ssl-expiry-date" "$HOME/.local/bin/x-ssl-expiry-date"
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-error" "$HOME/.local/bin/x-until-error"

View File

@@ -104,3 +104,10 @@ function menu_item()
LINE=$(printf '%-15s %-30s\n' "$1" "$2")
echo -e "$(__log_indent)$(__log_marker) $LINE"
}
# https://stackoverflow.com/a/85932
function fn_exists()
{
declare -f -F "$1" > /dev/null
return $?
}