Compare commits
No commits in common. "41f13f65d3f77a17110466c281f1145d124a4b12" and "d9b21ce70d6f9bc1cbc5fddae7d1fb399725a85d" have entirely different histories.
41f13f65d3
...
d9b21ce70d
|
@ -169,26 +169,21 @@ export MAIL="timo42@proton.me"
|
||||||
|
|
||||||
export GOPATH="$HOME/go"
|
export GOPATH="$HOME/go"
|
||||||
|
|
||||||
# ld_lib_path_append \
|
ld_lib_path_append "${LD_LIBRARY_PATH}:${HOME}/.local/lib"
|
||||||
# "${HOME}/.local/lib"
|
export LD_LIBRARY_PATH
|
||||||
# export LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
path_prepend \
|
path_prepend "/bin" \
|
||||||
"/bin" \
|
|
||||||
"/sbin" \
|
"/sbin" \
|
||||||
"/usr/bin" \
|
"/usr/bin" \
|
||||||
"/usr/sbin" \
|
"/usr/sbin" \
|
||||||
"/usr/local/bin" \
|
"/usr/local/bin" \
|
||||||
"/usr/local/sbin" \
|
"/usr/lcoal/sbin" \
|
||||||
"/usr/games" \
|
|
||||||
"/usr/local/games" \
|
"/usr/local/games" \
|
||||||
|
"/usr/games" \
|
||||||
"/snap/bin" \
|
"/snap/bin" \
|
||||||
|
|
||||||
path_append \
|
|
||||||
"${HOME}/bin" \
|
"${HOME}/bin" \
|
||||||
"${HOME}/.bin" \
|
|
||||||
"${HOME}/.local/bin" \
|
"${HOME}/.local/bin" \
|
||||||
"${HOME}/.local/sbin" \
|
"${HOME}/.local/include" \
|
||||||
"${HOME}/.brew/bin" \
|
"${HOME}/.brew/bin" \
|
||||||
"${GOPATH}/bin"
|
"${GOPATH}/bin"
|
||||||
export PATH
|
export PATH
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#! /bin/bash --
|
#! /bin/bash --
|
||||||
# ex: set ts=4 sw=4 ft=sh
|
# ex: set ts=4 sw=4 ft=sh
|
||||||
|
|
||||||
# TODO: Test on solaris (and other unices). Many tools will fail since we're not considering /usr/xpg4/bin
|
|
||||||
|
|
||||||
# Exit when noninteractive. This is more portable than checking PS1.
|
# Exit when noninteractive. This is more portable than checking PS1.
|
||||||
[ "${-#*i}" = "${-}" ] && return
|
[ "${-#*i}" = "${-}" ] && return
|
||||||
|
|
||||||
|
@ -54,73 +52,6 @@ hash -r
|
||||||
unalias -a
|
unalias -a
|
||||||
unset POSIXLY_CORRECT
|
unset POSIXLY_CORRECT
|
||||||
|
|
||||||
################################# environment ##################################
|
|
||||||
export EDITOR="$({ type -P nvim ||
|
|
||||||
type -P vim ||
|
|
||||||
type -P vi ||
|
|
||||||
type -P nvi ||
|
|
||||||
type -P hx ||
|
|
||||||
type -P nano ||
|
|
||||||
type -P ex ||
|
|
||||||
type -P ed ; } 2>/dev/null)"
|
|
||||||
export GIT_SSH_COMMAND='ssh -oIdentitiesOnly=yes -F"${HOME-}"/.ssh/config'
|
|
||||||
export LANG='en_US.UTF-8'
|
|
||||||
export USER="${USER:-$(whoami)}"
|
|
||||||
export VISUAL="${EDITOR-}"
|
|
||||||
export SUDO_EDITOR="${EDITOR-}"
|
|
||||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
|
||||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
|
||||||
export GIT_CONFIG_GLOBAL="$HOME/.gitconfig"
|
|
||||||
export GPG_TTY="$(tty)"
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING="1"
|
|
||||||
export USER42="tischmid"
|
|
||||||
export EMAIL42="timo42@proton.me"
|
|
||||||
export MAIL="timo42@proton.me"
|
|
||||||
export GOPATH="$HOME/go"
|
|
||||||
export MANPAGER='nvim +Man!'
|
|
||||||
# export MANPAGER='less -X'
|
|
||||||
export BAT_THEME='gruvbox-dark'
|
|
||||||
# export BAT_THEME='gruvbox-light'
|
|
||||||
export PATH
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
if ! [ -n "${USER-}" ] ; then
|
|
||||||
if ! USER="$(2>/dev/null ps -o user= -p "${$}" | awk '{print $1}')" ; then
|
|
||||||
if ! USER="$(2>/dev/null whoami)" ; then
|
|
||||||
if ! USER="$(2>/dev/null id -u -n)"; then
|
|
||||||
if ! USER="$(basename -- "$(HOME=~ && printf %s "${HOME}")")" ; then
|
|
||||||
if ! USER="$(2>/dev/null logname)" ; then
|
|
||||||
if USER="${LOGNAME-}" ; [ -z "${USER}" ] ; then
|
|
||||||
unset USER
|
|
||||||
fi; fi; fi; fi; fi; fi; fi
|
|
||||||
|
|
||||||
if ! [ -n "${HOME-}" ] ; then
|
|
||||||
if ! HOME="$(getent passwd "$(id -u "${USER}")" | cut -d: -f6)" ; then
|
|
||||||
if ! HOME="$(getent passwd "${UID}" | cut -d: -f6)" ; then
|
|
||||||
if ! HOME="$(awk -v FS=':' -v user="${USER}" '($1==user) {print $6}' "/etc/passwd")" ; then
|
|
||||||
unset HOME
|
|
||||||
HOME=~
|
|
||||||
if [ "${HOME}" = "~" ] ; then
|
|
||||||
if ! mkdir "/tmp/${USER}" && HOME="/tmp/${USER}" ; then
|
|
||||||
unset HOME
|
|
||||||
fi; fi ; fi ; fi ; fi; fi
|
|
||||||
|
|
||||||
[ -n "${DISPLAY-}" ] || log.warn 'DISPLAY not set'
|
|
||||||
|
|
||||||
if [ ! "${TERM-}" = "linux" ] ; then
|
|
||||||
if [ -f '/usr/share/terminfo/x/xterm-256color' ] ; then
|
|
||||||
export TERM='xterm-256color'
|
|
||||||
elif [ -f '/usr/share/terminfo/x/xterm-color' ] ; then
|
|
||||||
export TERM='xterm-color'
|
|
||||||
elif [ -f '/usr/share/terminfo/x/xterm' ] ; then
|
|
||||||
export TERM='xterm'
|
|
||||||
elif [ -f '/usr/share/terminfo/s/screen-256color' ] ; then
|
|
||||||
export TERM='screen-256color'
|
|
||||||
elif [ -f '/usr/share/terminfo/s/screen' ] ; then
|
|
||||||
export TERM='screen'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
######################## path append & prepend (posix) #########################
|
######################## path append & prepend (posix) #########################
|
||||||
pathvarprepend () {
|
pathvarprepend () {
|
||||||
# prepending paths to pathvar denoted by the expansion of the PATHVAR parameter
|
# prepending paths to pathvar denoted by the expansion of the PATHVAR parameter
|
||||||
|
@ -276,22 +207,21 @@ readonly BASH_SESSION_NAME="${$}"
|
||||||
HISTSIZE='-1'
|
HISTSIZE='-1'
|
||||||
HISTFILESIZE='-1'
|
HISTFILESIZE='-1'
|
||||||
REAL_HISTFILE="${HOME}/.better_bash_history/.bash_history_$(printf "%(%Y-%m-%d)T")_daily"
|
REAL_HISTFILE="${HOME}/.better_bash_history/.bash_history_$(printf "%(%Y-%m-%d)T")_daily"
|
||||||
REAL_HISTDIR="$(dirname -- "${REAL_HISTFILE}")"
|
|
||||||
HISTFILE="${HOME}/.better_bash_history/.bash_history_$(printf '%(%Y-%m-%d-%H-%M-%S)T')_${BASH_SESSION_NAME}"
|
HISTFILE="${HOME}/.better_bash_history/.bash_history_$(printf '%(%Y-%m-%d-%H-%M-%S)T')_${BASH_SESSION_NAME}"
|
||||||
HISTDIR="$(dirname -- "${HISTFILE}")"
|
HISTDIR="$(dirname -- "$HISTFILE")"
|
||||||
HISTTIMEFORMAT=$'\033[m%F %T: '
|
HISTTIMEFORMAT=$'\033[m%F %T: '
|
||||||
HISTCONTROL='ignoreboth'
|
HISTCONTROL='ignoreboth'
|
||||||
history -c
|
history -c
|
||||||
history -r -- "${REAL_HISTFILE}"
|
history -r -- "${REAL_HISTFILE}"
|
||||||
write_history () {
|
write_history () {
|
||||||
[ -d "${REAL_HISTDIR}" ] || { rm -f -- "${REAL_HISTDIR}" && mkdir -p -- "${REAL_HISTDIR}" ; }
|
[ -d "${REAL_HISTFILE}" ] || { rm -f -- "$(dirname -- "${REAL_HISTFILE}")" && mkdir -p -- "$(dirname -- "${REAL_HISTFILE}")" ; }
|
||||||
[ -f "${HISTFILE}" ] &&
|
[ -f "${HISTFILE}" ] &&
|
||||||
[ -r "${HISTFILE}" ] &&
|
[ -r "${HISTFILE}" ] &&
|
||||||
<"${HISTFILE}" 1>/dev/null tee -a -- "${REAL_HISTFILE}" &&
|
<"${HISTFILE}" 1>/dev/null tee -a -- "${REAL_HISTFILE}" &&
|
||||||
rm -f -- "${HISTFILE}"
|
rm -f -- "${HISTFILE}"
|
||||||
} && trap 'write_history' EXIT
|
} && trap 'write_history' EXIT
|
||||||
|
|
||||||
############################# vim aliases (posix) ##############################
|
############################# VIM ALIASES (posix) ##############################
|
||||||
if _have nvim ; then
|
if _have nvim ; then
|
||||||
alias vi="$(_path_lookup nvim)"
|
alias vi="$(_path_lookup nvim)"
|
||||||
elif _have vim ; then
|
elif _have vim ; then
|
||||||
|
@ -602,7 +532,46 @@ clone42 () {
|
||||||
} || { printf '%s\n' "Could not clone repo!" ; }
|
} || { printf '%s\n' "Could not clone repo!" ; }
|
||||||
}
|
}
|
||||||
|
|
||||||
################################ bash pre-exec #################################
|
################################# ENVIRONMENT ##################################
|
||||||
|
export GIT_SSH_COMMAND='ssh -oIdentitiesOnly=yes -F"${HOME-}"/.ssh/config'
|
||||||
|
|
||||||
|
export LANG='en_US.UTF-8'
|
||||||
|
export USER="${USER:-$(whoami)}"
|
||||||
|
|
||||||
|
export EDITOR="$({ type -P nvim ||
|
||||||
|
type -P vim ||
|
||||||
|
type -P vi ||
|
||||||
|
type -P nvi ||
|
||||||
|
type -P hx ||
|
||||||
|
type -P nano ||
|
||||||
|
type -P ex ||
|
||||||
|
type -P ed ; } 2>/dev/null)"
|
||||||
|
export VISUAL="${EDITOR-}"
|
||||||
|
export SUDO_EDITOR="${EDITOR-}"
|
||||||
|
|
||||||
|
export MANPAGER='nvim +Man!'
|
||||||
|
# export MANPAGER='less -X'
|
||||||
|
|
||||||
|
export BAT_THEME='gruvbox-dark'
|
||||||
|
# export BAT_THEME='gruvbox-light'
|
||||||
|
|
||||||
|
[ -n "${DISPLAY-}" ] || log.warn 'DISPLAY not set'
|
||||||
|
|
||||||
|
if [ ! "${TERM-}" = "linux" ] ; then
|
||||||
|
if [ -f '/usr/share/terminfo/x/xterm-256color' ] ; then
|
||||||
|
export TERM='xterm-256color'
|
||||||
|
elif [ -f '/usr/share/terminfo/x/xterm-color' ] ; then
|
||||||
|
export TERM='xterm-color'
|
||||||
|
elif [ -f '/usr/share/terminfo/x/xterm' ] ; then
|
||||||
|
export TERM='xterm'
|
||||||
|
elif [ -f '/usr/share/terminfo/s/screen-256color' ] ; then
|
||||||
|
export TERM='screen-256color'
|
||||||
|
elif [ -f '/usr/share/terminfo/s/screen' ] ; then
|
||||||
|
export TERM='screen'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
################################ BASH PRE-EXEC #################################
|
||||||
if [ ! -f "${HOME}"/.bash-preexec.sh ] ; then
|
if [ ! -f "${HOME}"/.bash-preexec.sh ] ; then
|
||||||
curl -sfkSL "https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh" -o "${HOME}"/.bash-preexec.sh
|
curl -sfkSL "https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh" -o "${HOME}"/.bash-preexec.sh
|
||||||
fi
|
fi
|
||||||
|
@ -634,7 +603,7 @@ precmd() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#################################### prompt ####################################
|
#################################### PROMPT ####################################
|
||||||
GIT_PS1_SHOWDIRTYSTATE='1'
|
GIT_PS1_SHOWDIRTYSTATE='1'
|
||||||
GIT_PROMPT='1'
|
GIT_PROMPT='1'
|
||||||
if [ ! -f "${HOME}"/git-prompt.sh ] && [ "${GIT_PROMPT-}" -eq "1" ] ; then
|
if [ ! -f "${HOME}"/git-prompt.sh ] && [ "${GIT_PROMPT-}" -eq "1" ] ; then
|
||||||
|
@ -679,7 +648,7 @@ fi
|
||||||
# Show shell level
|
# Show shell level
|
||||||
# PS1='[${SHLVL}] '"${PS1}"
|
# PS1='[${SHLVL}] '"${PS1}"
|
||||||
|
|
||||||
# ##################################### aoc ######################################
|
# ##################################### AOC ######################################
|
||||||
AOC_DIR="${HOME}/projects/aoc" # remember to change this to whatever your AOC directory is
|
AOC_DIR="${HOME}/projects/aoc" # remember to change this to whatever your AOC directory is
|
||||||
alias aos='< in.txt python3 solution.py'
|
alias aos='< in.txt python3 solution.py'
|
||||||
alias aot='< test.txt printf '\033[34m' ; python3 solution.py ; printf '\033[m''
|
alias aot='< test.txt printf '\033[34m' ; python3 solution.py ; printf '\033[m''
|
||||||
|
@ -790,7 +759,7 @@ aocload () {
|
||||||
tmux send-keys "nvim './solution.py'" ENTER
|
tmux send-keys "nvim './solution.py'" ENTER
|
||||||
}
|
}
|
||||||
|
|
||||||
############################## terminal settings ###############################
|
############################## TERMINAL SETTINGS ###############################
|
||||||
tabs -4
|
tabs -4
|
||||||
set -o emacs
|
set -o emacs
|
||||||
_have lesspipe && eval "$(SHELL=/bin/sh lesspipe)"
|
_have lesspipe && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
@ -802,10 +771,7 @@ _have xset && 2>/dev/null xset r rate 200 60
|
||||||
# Disable bell
|
# Disable bell
|
||||||
_have xset && 2>/dev/null xset -b
|
_have xset && 2>/dev/null xset -b
|
||||||
|
|
||||||
################################# completions ##################################
|
################################# COMPLETIONS ##################################
|
||||||
complete -F _command vimw
|
complete -F _command vimw
|
||||||
complete -C backup_dir backup_dir
|
|
||||||
complete -C backup_file backup_file
|
|
||||||
|
|
||||||
################################### sources ####################################
|
|
||||||
_source_if "${HOME}/.userbashrc"
|
_source_if "${HOME}/.userbashrc"
|
||||||
|
|
|
@ -1,6 +1 @@
|
||||||
# PATH="${PATH:+$PATH:}${HOME}/.local/bin"
|
0 * * * * /home/tosuman/.local/bin/system_update.sh
|
||||||
WHATEVER="$(echo hi)"
|
|
||||||
* * * * * echo $PATH > tmp.txt
|
|
||||||
* * * * * echo $WHATEVER > tmp2.txt
|
|
||||||
# 0 * * * * /home/tosuman/.local/bin/system_update.sh
|
|
||||||
# * * * * * PATH="$PATH:" /home/tosuman/.local/bin/backup_file /home/tosuman/
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ def main() -> int:
|
||||||
input("Press any key to exit")
|
input("Press any key to exit")
|
||||||
return 1
|
return 1
|
||||||
matches = re.findall(URL_REGEX, pane_out.decode())
|
matches = re.findall(URL_REGEX, pane_out.decode())
|
||||||
sp.run([os.environ['HOME'] + '/.local/bin/tui_choice'] + matches)
|
sp.run([os.environ['HOME'] + '/.local/bin/tui_choice.sh'] + matches)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
#! /bin/sh -
|
|
||||||
# Depends on GNU cp, log.err
|
|
||||||
|
|
||||||
############################### completion start ###############################
|
|
||||||
options='--no-chattr --no-sudo'
|
|
||||||
if [ -n "${COMP_LINE}" ] ; then
|
|
||||||
if [ "${1}" = "${3}" ] && [ ! "${2#-}" = "${2}" ] ; then
|
|
||||||
for option in $options ; do
|
|
||||||
case "${option}" in
|
|
||||||
"${2}"*) printf '%s\n' "${option}" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
elif [ "${2#-}" = "${2}" ] ; then
|
|
||||||
find "$(dirname -- "${2}")" -mindepth 1 -maxdepth 1 -path "$(dirname -- "${2}")/$(basename -- "${2}")*"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
################################ completion end ################################
|
|
||||||
|
|
||||||
############################ argument parsing start ############################
|
|
||||||
no_chattr=0
|
|
||||||
no_sudo=0
|
|
||||||
while : ; do
|
|
||||||
case "${1}" in
|
|
||||||
--no-chattr|-c) no_chattr=1 ;;
|
|
||||||
--no-sudo|-s) no_sudo=1 ;;
|
|
||||||
-*) log.err "Invalid option argument: '${1}'" ; exit 1 ;;
|
|
||||||
*) break ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
test "${#}" -ne "2" && { log.err "Usage: backup_dir [--no-chattr] [--no-sudo] BACKUP_DIR DIR" ; exit 1 ; }
|
|
||||||
|
|
||||||
backupdir="${1:-${HOME}/backups}"
|
|
||||||
srcdir="${2}"
|
|
||||||
############################# argument parsing end #############################
|
|
||||||
|
|
||||||
if [ "${no_sudo}" = "1" ] ; then
|
|
||||||
sudo_cmd=""
|
|
||||||
else
|
|
||||||
sudo_cmd="sudo --"
|
|
||||||
fi
|
|
||||||
|
|
||||||
backupname="$(basename -- "$srcdir")"
|
|
||||||
|
|
||||||
[ -d "${srcdir}" ] || { log.err "Directory '${srcdir}' does not exist" ; exit 2 ; }
|
|
||||||
[ -d "${backupdir}" ] || mkdir -p -- "${backupdir}" || { log.err "Backup Directory '${backupdir}' couldn't be created" ; exit 3 ; }
|
|
||||||
|
|
||||||
if [ -e "${backupdir}/${backupname}" ] && [ "${no_chattr}" = "0" ] ; then
|
|
||||||
$sudo_cmd chattr -i "${backupdir}/${backupname}" || { log.err "Can't chattr -i '${backupdir}/${backupname}'" ; exit 4 ; }
|
|
||||||
fi
|
|
||||||
tar --backup=t -cvzf "${backupdir}/${backupname}" "${srcdir}" || { log.err "Can't tar --backup=t -cvzf '${backupdir}/${backupname}' '${srcdir}'" ; exit 5 ; }
|
|
||||||
|
|
||||||
if [ "${no_chattr}" = "0" ] ; then
|
|
||||||
$sudo_cmd find "${backupdir}" -mindepth 1 -exec chattr +i {} + || { log.err "Can't chattr +i some files" ; exit 6 ; }
|
|
||||||
fi
|
|
|
@ -1,57 +0,0 @@
|
||||||
#! /bin/sh -
|
|
||||||
# Depends on GNU cp, log.err
|
|
||||||
|
|
||||||
############################### completion start ###############################
|
|
||||||
options='--no-chattr --no-sudo'
|
|
||||||
if [ -n "${COMP_LINE}" ] ; then
|
|
||||||
if [ "${1}" = "${3}" ] && [ ! "${2#-}" = "${2}" ] ; then
|
|
||||||
for option in $options ; do
|
|
||||||
case "${option}" in
|
|
||||||
"${2}"*) printf '%s\n' "${option}" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
elif [ "${2#-}" = "${2}" ] ; then
|
|
||||||
find "$(dirname -- "${2}")" -mindepth 1 -maxdepth 1 -path "$(dirname -- "${2}")/$(basename -- "${2}")*"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
################################ completion end ################################
|
|
||||||
|
|
||||||
############################ argument parsing start ############################
|
|
||||||
no_chattr=0
|
|
||||||
no_sudo=0
|
|
||||||
while : ; do
|
|
||||||
case "${1}" in
|
|
||||||
--no-chattr|-c) no_chattr=1 ;;
|
|
||||||
--no-sudo|-s) no_sudo=1 ;;
|
|
||||||
-*) log.err "Invalid option argument: '${1}'" ; exit 1 ;;
|
|
||||||
*) break ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
test "${#}" -ne "2" && { log.err "Usage: backup_dir [--no-chattr] [--no-sudo] BACKUP_DIR DIR" ; exit 1 ; }
|
|
||||||
|
|
||||||
backupdir="${1:-${HOME}/backups}"
|
|
||||||
srcfile="${2}"
|
|
||||||
############################# argument parsing end #############################
|
|
||||||
|
|
||||||
if [ "${no_sudo}" = "1" ] ; then
|
|
||||||
sudo_cmd=""
|
|
||||||
else
|
|
||||||
sudo_cmd="sudo --"
|
|
||||||
fi
|
|
||||||
|
|
||||||
backupname="$(basename -- "$srcfile")"
|
|
||||||
|
|
||||||
[ -f "${srcfile}" ] || { log.err "Regular File '${srcfile}' does not exist" ; exit 2 ; }
|
|
||||||
[ -d "${backupdir}" ] || mkdir -p -- "${backupdir}" || { log.err "Backup Directory '${backupdir}' couldn't be created" ; exit 3 ; }
|
|
||||||
|
|
||||||
if [ -e "${backupdir}/${backupname}" ] && [ "${no_chattr}" = "0" ] ; then
|
|
||||||
$sudo_cmd chattr -i "${backupdir}/${backupname}" || { log.err "Can't chattr -i '${backupdir}/${backupname}'" ; exit 4 ; }
|
|
||||||
fi
|
|
||||||
cp --backup=t "${srcfile}" "${backupdir}/${backupname}" || { log.err "Can't cp --backup=t '${srcfile}' '${backupdir}/${backupname}'" ; exit 5 ; }
|
|
||||||
|
|
||||||
if [ "${no_chattr}" = "0" ] ; then
|
|
||||||
$sudo_cmd find "${backupdir}" -mindepth 1 -exec chattr +i {} + || { log.err "Can't chattr +i some files" ; exit 6 ; }
|
|
||||||
fi
|
|
Loading…
Reference in New Issue