Merge branch 'master' of https://git.schuerz.at/public/myshellconfig
This commit is contained in:
commit
b64576cb7f
15 changed files with 147 additions and 89 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,3 +11,4 @@ bashrc_local
|
|||
.local_scripts
|
||||
.git-token
|
||||
.last_update_submodules
|
||||
.last_update_repo
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -55,3 +55,6 @@
|
|||
[submodule "vim/pack/color/start/vim-colors-solarized"]
|
||||
path = vim/pack/color/start/vim-colors-solarized
|
||||
url = https://github.com/altercation/vim-colors-solarized.git
|
||||
[submodule "vim/pack/plugins/start/vim-gnupg"]
|
||||
path = vim/pack/plugins/start/vim-gnupg
|
||||
url = https://github.com/jamessan/vim-gnupg
|
||||
|
|
69
bashrc_add
69
bashrc_add
|
@ -27,29 +27,28 @@ if [[ $- = *i* ]] ; then
|
|||
# hardcoded paths
|
||||
export MSC_BASE_PARENT="$(dirname $MSC_BASE)"
|
||||
export MSC_BASH_COMPLETION="${HOME}/${MSC_SUBPATH}/bash_completion.d"
|
||||
export MSC_GIT_UPD_SUBMOD_STATFILE="${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules"
|
||||
export MSC_GIT_UPD_REPO_STATFILE="${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo"
|
||||
|
||||
# Load DEFAULTS
|
||||
[ -e ${MSC_BASE}/defaults.conf ] && . ${MSC_BASE}/defaults.conf
|
||||
|
||||
|
||||
# Userdata
|
||||
[ -z "${USERNAME+x}" ] && export USERNAME="$USER"
|
||||
[ -z "${USEREMAIL+x}" ] && export USEREMAIL="$USER@$(domainname -d)"
|
||||
[ -z "${FULLNAME+x}" ] && export FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
|
||||
[ -z "${USERNAME+x}" ] && export USERNAME="$USER"
|
||||
[ -z "${USEREMAIL+x}" ] && export USEREMAIL="$USER@$(domainname -d)"
|
||||
[ -z "${FULLNAME+x}" ] && export FULLNAME="$(getent passwd $USER | cut -d ":" -f 5 | cut -d ',' -f 1)"
|
||||
|
||||
# GIT
|
||||
[ -z "${GIT_AUTHOR_NAME+x}" ] && export GIT_AUTHOR_NAME=$FULLNAME
|
||||
[ -z "${GIT_AUTHOR_EMAIL+x}" ] && export GIT_AUTHOR_EMAIL=$USEREMAIL
|
||||
[ -z "${GIT_COMMITTER_NAME+x}" ] && export GIT_COMMITTER_NAME=$FULLNAME
|
||||
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && export GIT_COMMITTER_EMAIL=$USEREMAIL
|
||||
[ -z "${GIT_AUTHOR_NAME+x}" ] && export GIT_AUTHOR_NAME=$FULLNAME
|
||||
[ -z "${GIT_AUTHOR_EMAIL+x}" ] && export GIT_AUTHOR_EMAIL=$USEREMAIL
|
||||
[ -z "${GIT_COMMITTER_NAME+x}" ] && export GIT_COMMITTER_NAME=$FULLNAME
|
||||
[ -z "${GIT_COMMITTER_EMAIL+x}" ] && export GIT_COMMITTER_EMAIL=$USEREMAIL
|
||||
|
||||
[ -z "${MSC_GIT_TIMEOUT+x}" ] && export MSC_GIT_TIMEOUT=5s
|
||||
[ -z "${MSC_GIT_CHECKOUT_TIMEOUT+x}" ] && export MSC_GIT_CHECKOUT_TIMEOUT=20s
|
||||
[ -z "${MSC_GIT_SYNC+x}" ] && export MSC_GIT_SYNC=true
|
||||
[ -z "${MSC_GIT_SUBMODULES_UPDATE_DEFAULT+x}" ] && export MSC_GIT_SUBMODULES_UPDATE_DEFAULT=true
|
||||
[ -z "${MSC_GIT_SUBMODULES_UPDATE_INTERVALL+x}" ] && export MSC_GIT_SUBMODULES_UPDATE_INTERVALL=48 #intervall in hours
|
||||
[ -z "${MSC_GIT_SUBMODULES_SERVER_DEFAULT+x}" ] && export MSC_GIT_SUBMODULES_SERVER_DEFAULT="git://git.schuerz.at/github.com/"
|
||||
[ -z "${MSC_GIT_CHECKOUTSCRIPT_OPTIONS_DEFAULT+x}" ] && export MSC_GIT_CHECKOUTSCRIPT_OPTIONS_DEFAULT="-h"
|
||||
# [ -z "${MSC_GIT_TIMEOUT+x}" ] && export MSC_GIT_TIMEOUT=5s
|
||||
[ -z "${MSC_GIT_CHECKOUT_TIMEOUT+x}" ] && export MSC_GIT_CHECKOUT_TIMEOUT=20s
|
||||
[ -z "${MSC_GIT_SYNC+x}" ] && export MSC_GIT_SYNC=true
|
||||
|
||||
# hardcoded git
|
||||
export SGIT="git -C ${MSC_BASE}"
|
||||
|
||||
|
@ -61,15 +60,11 @@ if [[ $- = *i* ]] ; then
|
|||
|
||||
|
||||
# Logging
|
||||
[ -z "${MSC_LOGDIR+x}" ] && export MSC_LOGDIR="${HOME}/logs"
|
||||
[ -z "${MSC_LOGFILE+x}" ] && export MSC_LOGFILE="${MSC_LOGDIR}/myshellconfig.log"
|
||||
[ -z "${MSC_LOGLEVEL_DEFAULT+x}" ] && export MSC_LOGLEVEL_DEFAULT="INFO"
|
||||
[ -z "${MSC_FILELOGLEVEL_DEFAULT+x}" ] && export MSC_FILELOGLEVEL_DEFAULT="DEBUG"
|
||||
[ -z "${SCRIPT_LOG+x}" ] && export SCRIPT_LOG="${MSC_LOGFILE}"
|
||||
[ -z "${LOGLEVEL_DEFAULT+x}" ] && export LOGLEVEL_DEFAULT="${MSC_LOGLEVEL_DEFAULT-INFO}"
|
||||
[ -z "${FILELOGLEVEL_DEFAULT+x}" ] && export FILELOGLEVEL_DEFAULT="${MSC_FILELOGLEVEL_DEFAULT-INFO}"
|
||||
[ -z "${MSC_LOGDIR+x}" ] && export MSC_LOGDIR="${HOME}/logs"
|
||||
[ -z "${MSC_LOGFILE+x}" ] && export MSC_LOGFILE="${MSC_LOGDIR}/myshellconfig.log"
|
||||
[ -z "${SCRIPT_LOG+x}" ] && export SCRIPT_LOG="${MSC_LOGFILE}"
|
||||
# Create necessary directories for logging
|
||||
[ -n "${MSC_LOGDIR-x}" ] && mkdir -p "$MSC_LOGDIR"
|
||||
[ -n "${MSC_LOGDIR-x}" ] && mkdir -p "$MSC_LOGDIR"
|
||||
# load logging functions
|
||||
. ${MSC_BASE}/logging
|
||||
|
||||
|
@ -90,26 +85,40 @@ EOF
|
|||
|
||||
ckrepo () {
|
||||
# check if remote repo is reachable
|
||||
if $MSC_GIT_SYNC; then
|
||||
if $( timeout --foreground "${MSC_GIT_TIMEOUT}" $SGIT ls-remote >/dev/null 2>&1) ;then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if ${MSC_GIT_SYNC-$MSC_GIT_REPO_UPDATE}; then
|
||||
|
||||
if [ $(stat --printf %Y ${MSC_GIT_UPD_REPO_STATFILE} 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") ]; then
|
||||
logwarn "sync-intervall (${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours) reached"
|
||||
logwarn "check if reachable"
|
||||
if $( timeout --foreground "${MSC_GIT_TIMEOUT-$MSC_GIT_TIMEOUT_DEFAULT}" $SGIT ls-remote >/dev/null 2>&1) ;then
|
||||
logwarn "reachable"
|
||||
return 0
|
||||
else
|
||||
logwarn "not reachable"
|
||||
return 3
|
||||
fi
|
||||
else
|
||||
local seconds=$(( $( date --date="@$(stat --printf %Y ${MSC_GIT_UPD_REPO_STATFILE} 2>/dev/null || echo 0 )" "+%s") - $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") ))
|
||||
logwarn "sync-intervall (${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours) not reached yet. $((seconds/86400)) days $(date -d "1970-01-01 + $seconds seconds" "+%H hours %M minutes %S seconds") left."
|
||||
return 2
|
||||
fi
|
||||
else
|
||||
logwarn "no sync allowed from config" >&2
|
||||
return 0
|
||||
return 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
lastupdatesubmodules () {
|
||||
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules
|
||||
#date "+%s" > ${MSC_GIT_UPD_SUBMOD_STATFILE}
|
||||
touch ${MSC_GIT_UPD_REPO_STATFILE}
|
||||
}
|
||||
export -f lastupdatesubmodules
|
||||
|
||||
lastupdaterepo () {
|
||||
date "+%s" > ${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo
|
||||
#date "+%s" > ${MSC_GIT_UPD_REPO_STATFILE}
|
||||
touch ${MSC_GIT_UPD_REPO_STATFILE}
|
||||
}
|
||||
export -f lastupdaterepo
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ cat << EOF >> "${MSC_LOGFILE}"
|
|||
+-----BEGINN git update repo $(date) -------------------------------+
|
||||
EOF
|
||||
|
||||
set -- $(getopt -u -o hs --long headless,submodules-update -- "$@" )
|
||||
set -- $(getopt -u -o hrs --long headless,force-repo-update,force-submodules-update -- "$@" )
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
|
@ -44,7 +44,11 @@ while [ $# -gt 0 ]; do
|
|||
PRE="${MSC_GIT_REMOTE_NAME}"
|
||||
shift
|
||||
;;
|
||||
-s|--submodules-update)
|
||||
-r|--force-repo-update)
|
||||
dosubmodupdate="true"
|
||||
shift
|
||||
;;
|
||||
-s|--force-submodules-update)
|
||||
dosubmodupdate="true"
|
||||
shift
|
||||
;;
|
||||
|
@ -61,71 +65,73 @@ done
|
|||
#echo -n " remote: ${MSC_GIT_REMOTE_NAME}, branch: ${MSC_GIT_BRANCH}: "
|
||||
|
||||
# Check for updates in submodules only if last check was INTERVALL hours in the past
|
||||
if [ $(cat ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_SUBMODULES_UPDATE_INTERVALL} hours ago" "+%s") \
|
||||
#if [ $(cat ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules 2>/dev/null || echo 0 ) \
|
||||
[ -z "${MSC_GIT_UPD_SUBMOD_STATFILE+x}" ] && export MSC_GIT_UPD_SUBMOD_STATFILE="${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules"
|
||||
[ -z "${MSC_GIT_UPD_REPO_STATFILE+x}" ] && export MSC_GIT_UPD_REPO_STATFILE="${MSC_BASE%/}${MSC_BASE:+/}.last_update_repo"
|
||||
|
||||
if [ $(stat --printf %Y ${MSC_GIT_UPD_SUBMOD_STATFILE} 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_SUBMODULES_UPDATE_INTERVALL-${MSC_GIT_SUBMODULES_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") \
|
||||
-a ${MSC_GIT_SUBMODULES_UPDATE-${MSC_GIT_SUBMODULES_UPDATE_DEFAULT-true}} ]; then
|
||||
[ -z "${dosrepoupdate+x}" ] && dorepoupdate="true"
|
||||
[ -z "${dorepoupdate+x}" ] && dorepoupdate="true"
|
||||
fi
|
||||
|
||||
if [ $(cat ${MSC_BASE%/}${MSC_BASE:+/}.last_update_submodules 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_SUBMODULES_UPDATE_INTERVALL} hours ago" "+%s") \
|
||||
-a ${MSC_GIT_SUBMODULES_UPDATE-${MSC_GIT_SUBMODULES_UPDATE_DEFAULT-true}} ]; then
|
||||
if [ $(stat --printf %Y ${MSC_GIT_UPD_REPO_STATFILE} 2>/dev/null || echo 0 ) \
|
||||
-lt $(date --date="${MSC_GIT_REPO_UPDATE_INTERVALL-${MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT}} hours ago" "+%s") \
|
||||
-a ${MSC_GIT_REPO_UPDATE-${MSC_GIT_REPO_UPDATE_DEFAULT-true}} ]; then
|
||||
[ -z "${dosubmodupdate+x}" ] && dosubmodupdate="true"
|
||||
fi
|
||||
|
||||
#echo $SGIT fetch ${MSC_GIT_REMOTE_NAME} -p 1>&2
|
||||
loginfo "fetch repo${dosubmodupdate:+ and submodules}"
|
||||
$SGIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarn fetch failed; gitupdateend; exit 1; }
|
||||
if ${dosubmodupdate:-false}; then
|
||||
lastupdatesubmodules
|
||||
fi
|
||||
if $dorepoupdate; then
|
||||
loginfo "fetch repo${dosubmodupdate:+ and submodules}"
|
||||
$SGIT fetch ${dosubmodupdate:+--recurse-submodules} ${MSC_GIT_REMOTE_NAME} -p 2>>"${MSC_LOGFILE}"|| { logwarn fetch failed; gitupdateend; exit 1; }
|
||||
if ${dosubmodupdate:-false}; then
|
||||
lastupdatesubmodules
|
||||
fi
|
||||
|
||||
echo "Check for local changes:" >> "${MSC_LOGFILE}"
|
||||
if $SGIT diff-index --ignore-submodules --exit-code HEAD -- >> "${MSC_LOGFILE}" ; then
|
||||
cat << EOF >> "${MSC_LOGFILE}"
|
||||
no changes in local repo
|
||||
$SGIT checkout repo ${PRE}${PRE:+/}${MSC_GIT_BRANCH}
|
||||
EOF
|
||||
$SGIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH} 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 2; }
|
||||
$SGIT merge FETCH_HEAD 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 3; }
|
||||
else
|
||||
logwarn -n " Lokale Änderungen festgestellt:"
|
||||
echo " Siehe Logfile ${MSC_LOGFILE}" >&2
|
||||
cat << EOF >> "${MSC_LOGFILE}"
|
||||
um die Änderung zurückzusetzen bitte
|
||||
echo "Check for local changes:" >> "${MSC_LOGFILE}"
|
||||
if $SGIT diff-index --ignore-submodules --exit-code HEAD -- >> "${MSC_LOGFILE}" ; then
|
||||
cat << EOF >> "${MSC_LOGFILE}"
|
||||
no changes in local repo
|
||||
$SGIT checkout repo ${PRE}${PRE:+/}${MSC_GIT_BRANCH}
|
||||
EOF
|
||||
$SGIT checkout ${PRE}${PRE:+/}${MSC_GIT_BRANCH} 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 2; }
|
||||
$SGIT merge FETCH_HEAD 1>>"${MSC_LOGFILE}" 2>>"${MSC_LOGFILE}"|| { gitupdateend; exit 3; }
|
||||
touch $MSC_GIT_UPD_REPO_STATFILE
|
||||
else
|
||||
logwarn -n " Lokale Änderungen festgestellt:"
|
||||
echo " Siehe Logfile ${MSC_LOGFILE}" >&2
|
||||
cat << EOF >> "${MSC_LOGFILE}"
|
||||
um die Änderung zurückzusetzen bitte
|
||||
|
||||
$SGIT checkout \$FILENAME
|
||||
$SGIT checkout \$FILENAME
|
||||
|
||||
oder um alle lokalen Änderungen auf einmal zurückzusetzen:
|
||||
oder um alle lokalen Änderungen auf einmal zurückzusetzen:
|
||||
|
||||
$SGIT checkout .
|
||||
$SGIT checkout .
|
||||
|
||||
ausführen
|
||||
ausführen
|
||||
|
||||
Die Änderungen sind:
|
||||
$($SGIT diff-index HEAD --|awk '{print $5, $6}')
|
||||
$($SGIT diff-index -p HEAD --)
|
||||
Die Änderungen sind:
|
||||
$($SGIT diff-index HEAD --|awk '{print $5, $6}')
|
||||
$($SGIT diff-index -p HEAD --)
|
||||
EOF
|
||||
|
||||
gitupdateend
|
||||
exit 4
|
||||
gitupdateend
|
||||
exit 4
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
loginfo "repo${dosubmodupdate:+ and submodules} synced"
|
||||
loginfo "repo${dosubmodupdate:+ and submodules} synced"
|
||||
|
||||
#if ${MSC_GIT_SUBMODULES_UPDATE-${MSC_GIT_SUBMODULES_UPDATE_DEFAULT-true}}; then
|
||||
if ${dosubmodupdate:-false}; then
|
||||
loginfo "update and commit submodules"
|
||||
logdebug "$($SGIT submodule update --remote)"
|
||||
logdebug "$($SGIT commit -a -m 'update submodules')"
|
||||
lastupdatesubmodules
|
||||
touch $MSC_GIT_UPD_SUBMOD_STATFILE
|
||||
logwarn "submodules synced"
|
||||
fi
|
||||
#else
|
||||
# loginfo -n ", submodules not synced"
|
||||
# logdebug "Do not update submodules. It's denied by environment MSC_GIT_UPDATE_SUBMODULES: ${MSC_GIT_SUBMODULES_UPDATE-${MSC_GIT_SUBMODULES_UPDATE_DEFAULT-true}}"
|
||||
#fi
|
||||
fi
|
||||
|
||||
EXIT
|
||||
exit $rc
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
### GIT ####
|
||||
export MSC_GIT_REPO_UPDATE_DEFAULT=true
|
||||
export MSC_GIT_REPO_UPDATE_INTERVALL_DEFAULT=48 #intervall in hours
|
||||
export MSC_GIT_SUBMODULES_UPDATE_DEFAULT=true
|
||||
export MSC_GIT_SUBMODULES_UPDATE_INTERVALL=48 #intervall in hours
|
||||
export MSC_GIT_SUBMODULES_UPDATE_INTERVALL_DEFAULT=196 #intervall in hours
|
||||
export MSC_GIT_SUBMODULES_SERVER_DEFAULT="git://git.schuerz.at/github.com/"
|
||||
export MSC_GIT_CHECKOUTSCRIPT_OPTIONS_DEFAULT="-h"
|
||||
export MSC_GIT_TIMEOUT_DEFAULT=5s
|
||||
export MSC_GIT_CHECKOUT_TIMEOUT_DEFAULT=20s
|
||||
### LOGGING ###
|
||||
# Possible loglevel-values: ERROR, WARN, INFO, DEBUG, TRACE
|
||||
export MSC_LOGLEVEL_DEFAULT="INFO"
|
||||
export MSC_FILELOGLEVEL_DEFAULT="DEBUG"
|
||||
export LOGLEVEL_DEFAULT="${MSC_LOGLEVEL_DEFAULT-INFO}"
|
||||
export FILELOGLEVEL_DEFAULT="${MSC_FILELOGLEVEL_DEFAULT-INFO}"
|
||||
export LOGLEVEL_DEFAULT="${MSC_LOGLEVEL_DEFAULT}"
|
||||
export FILELOGLEVEL_DEFAULT="${MSC_FILELOGLEVEL_DEFAULT}"
|
||||
|
|
38
functions.sh
38
functions.sh
|
@ -353,13 +353,15 @@ sshs() {
|
|||
local TMPBASHCONFIG=$(mktemp -p ${XDG_RUNTIME_DIR} -t bashrc.XXXXXXXX --suffix=.conf)
|
||||
local FILELIST=( "${MSC_BASE}/functions.sh" "${MSC_BASE}/logging" "${MSC_BASE}/myshell_load_fortmpconfig" $(getbashrcfile) ~/.aliases "${MSC_BASE}/aliases" "${MSC_BASE}/PS1" "${MSC_BASE}/bash_completion.d/*" )
|
||||
|
||||
echo "FILELIST: $FILELIST"
|
||||
if [ -e "${HOME}/.config/myshellconfig/sshs_addfiles.conf" ] ; then
|
||||
for file in $(cat "${HOME}/.config/myshellconfig/sshs_addfiles.conf");do
|
||||
[ -e "$file" ] && {\
|
||||
echo "add $file to FILELIST"; \
|
||||
FILELIST+=("$i"); }
|
||||
for f in $(cat "${HOME}/.config/myshellconfig/sshs_addfiles.conf");do
|
||||
[ -e "$f" ] && {\
|
||||
echo "add $f to FILELIST"; \
|
||||
FILELIST+=("$f"); }
|
||||
done
|
||||
fi
|
||||
echo "FILELIST: $FILELIST"
|
||||
local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=15s -o ControlPath=~/.ssh/ssh-%r@%h:%p"
|
||||
# Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first
|
||||
cat << EOF >> "${TMPBASHCONFIG}"
|
||||
|
@ -944,4 +946,32 @@ get_crtime() {
|
|||
# return 0
|
||||
#}
|
||||
|
||||
|
||||
is_btrfs_subvolume() {
|
||||
sudo btrfs subvolume show "$1" >/dev/null
|
||||
}
|
||||
|
||||
convert_to_subvolume () {
|
||||
local XSUDO
|
||||
local DIR
|
||||
case $1 in
|
||||
--sudo|-s)
|
||||
XSUDO=sudo
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
DIR="${1}"
|
||||
[ -d "${DIR}" ] || return 1
|
||||
is_btrfs_subvolume "${DIR}" && return 0
|
||||
set -x
|
||||
#btrfs subvolume create "${DIR}".new && \
|
||||
${XSUDO:+sudo} btrfs subvolume create "${DIR}.new" && \
|
||||
/bin/cp -aTr --reflink=always "${DIR}" "${DIR}".new && \
|
||||
mv "${DIR}" "${DIR}".orig && \
|
||||
mv "${DIR}".new "${DIR}" || return 2
|
||||
|
||||
set +x
|
||||
return 0
|
||||
|
||||
}
|
||||
#EOF
|
||||
|
|
|
@ -116,13 +116,13 @@ if ! $SSHS; then
|
|||
else
|
||||
loginfo "Clone ${MSC_GIT_REMOTE} and configure git" >&2
|
||||
|
||||
if $( timeout --foreground "${MSC_GIT_CHECKOUT_TIMEOUT}" \
|
||||
if $( timeout --foreground "${MSC_GIT_CHECKOUT_TIMEOUT-$MSC_GIT_CHECKOUT_TIMEOUT_DEFAULT}" \
|
||||
git -C ${HOME} clone --recurse-submodules "${MSC_GIT_REMOTE}" "${MSC_BASE}" ); then
|
||||
:
|
||||
else
|
||||
MSC_GIT_REMOTE="${MSC_GIT_REMOTE_PUBLIC_HTTP}${MSC_GIT_REPO_NAME}"
|
||||
loginfo "Clone ${MSC_GIT_REMOTE} (http, because other protocol is not reachable) and configure git" >&2
|
||||
timeout --foreground "${MSC_GIT_CHECKOUT_TIMEOUT}" \
|
||||
timeout --foreground "${MSC_GIT_CHECKOUT_TIMEOUT-$MSC_GIT_CHECKOUT_TIMEOUT_DEFAULT}" \
|
||||
git -C ${HOME} clone --recurse-submodules "${MSC_GIT_REMOTE}" "${MSC_BASE}" || return 1 2>/dev/null || exit 1
|
||||
fi
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ab3937ee5a62d63bac9307bfe72601eeb4fc9cd2
|
||||
Subproject commit e9bc7331bde238e84f24b76ebb1f5e18799b15c4
|
|
@ -1 +1 @@
|
|||
Subproject commit 14af89743ac1c31ff9bb43682025eda50333a7d5
|
||||
Subproject commit aaa946fb6bd79b9af86fbaf4b6b63fd81d839bd9
|
|
@ -1 +1 @@
|
|||
Subproject commit f39208f1a074fb525270312a20c87521a50c74ef
|
||||
Subproject commit 59b4826806156142e9babc0179abd31a76b81a20
|
|
@ -1 +1 @@
|
|||
Subproject commit 5cf03c355b64836ebcb681136539f48ada34f363
|
||||
Subproject commit 8f1aa2c7fa44bf33b1fd4678f9c7b40c126b0e2b
|
|
@ -1 +1 @@
|
|||
Subproject commit 7afa1cfaa62e7fc6f891d0d59f4b10d046b5fd8e
|
||||
Subproject commit bebe504e38d0a20c30d6dd666c4c793b3cc66104
|
1
vim/pack/plugins/start/vim-gnupg
Submodule
1
vim/pack/plugins/start/vim-gnupg
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 96be0be1240a848da56d665b38e1b0fe7ee3f1af
|
|
@ -16,3 +16,4 @@ install plugins https://github.com/junegunn/fzf.git
|
|||
install plugins https://github.com/junegunn/fzf.vim.git
|
||||
install plugins https://github.com/airblade/vim-gitgutter.git
|
||||
remove plugins https://github.com/Lokaltog/powerline.git
|
||||
install plugins https://github.com/jamessan/vim-gnupg
|
||||
|
|
4
vimrc
4
vimrc
|
@ -271,8 +271,8 @@ nnoremap <C-L> <C-W><C-L>
|
|||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
" Map :next to <C-TAB>
|
||||
nmap <C-Tab> :next<CR>
|
||||
nmap <C-S-Tab> :prev<CR>
|
||||
nmap <C-Tab> :tabNext<CR>
|
||||
nmap <C-S-Tab> :tabPrev<CR>
|
||||
nmap <C-t> :tabnew<CR>
|
||||
"------------------------------------------------------------
|
||||
let g:SimplyFold_docstring_preview=1
|
||||
|
|
Loading…
Reference in a new issue