# HG changeset patch # User Peter Sanchez # Date 1730211871 21600 # Tue Oct 29 08:24:31 2024 -0600 # Node ID 36fc1f4a883f5eed6221acfff6220a05cdd85cbc # Parent 9276753ad80816810644432cf5636286ce4193e9 Updates diff --git a/bin/runbackup.sh b/bin/runbackup.sh --- a/bin/runbackup.sh +++ b/bin/runbackup.sh @@ -1,33 +1,29 @@ #!/bin/sh if [ "$1" = "--delete" ]; then - ROPTS="-azv --delete" + ROPTS="-rv --delete" else - ROPTS="-azv" + ROPTS="-rv" fi PKG_BACKUP_PATH="/home/pjs/.config/misc_conf_backup" RSYNC_BACKUP_PATH="/media/pjs/thinkpad_backup" BACKUP_SOURCE_PATH="/home/pjs" -# Export package list first (2 methods ... just because?) -echo "Getting package listings..." -dpkg --get-selections > $PKG_BACKUP_PATH/dpkg_get_selections.txt -apt list --installed > $PKG_BACKUP_PATH/apt_installed.txt - -# pip modules -echo "Getting Python modules..." -pip2 freeze > $PKG_BACKUP_PATH/pip2_freeze.txt -pip3.6 freeze > $PKG_BACKUP_PATH/pip36_freeze.txt -pip3.7 freeze > $PKG_BACKUP_PATH/pip37_freeze.txt -pip3.8 freeze > $PKG_BACKUP_PATH/pip38_freeze.txt +mkdir -p $PKG_BACKUP_PATH echo "Getting system config files..." for FILE in `cat $PKG_BACKUP_PATH/../backup_system_config_files.txt`; do NFILE=$(echo $FILE | sed -e 's/\//__/g') - cp -Rp $FILE $PKG_BACKUP_PATH/$NFILE + doas cp -Rp $FILE $PKG_BACKUP_PATH/$NFILE done +echo "Getting package listings..." +apk list -I > $PKG_BACKUP_PATH/apk_list_installed.txt + +echo "Getting Python modules..." +pip3 freeze > $PKG_BACKUP_PATH/pip3_freeze.txt + echo "Dumping crontab..." crontab -l > $PKG_BACKUP_PATH/pjs_crontab.txt @@ -41,5 +37,7 @@ echo "Cleaning up..." rm -rf $PKG_BACKUP_PATH/* +printf "%s: Completed backup\n" "$(date -Iseconds)" >>$RSYNC_BACKUP_PATH/backup.log + sleep 2 sync diff --git a/vim/vimrc b/vim/vimrc --- a/vim/vimrc +++ b/vim/vimrc @@ -35,6 +35,16 @@ set t_Sb=[4%dm endif +" Vimdiff +if &diff + set cursorline + map ] ]c + map [ [c + hi DiffAdd ctermfg=233 ctermbg=LightGreen guifg=#003300 guibg=#DDFFDD gui=none cterm=none + hi DiffChange ctermbg=white guibg=#ececec gui=none cterm=none + hi DiffText ctermfg=233 ctermbg=yellow guifg=#000033 guibg=#DDDDFF gui=none cterm=none +endif + " Vim5 comes with syntaxhighlighting. If you want to enable syntaxhightlighting " by default uncomment the next three lines. "if has("syntax") @@ -146,6 +156,12 @@ autocmd FileType mail setlocal fo+=aw tw=72 augroup END +augroup json + au! + au BufRead,BufNewFile *.json set filetype=json + autocmd FileType json nmap J :%! jq +augroup END + endif " has ("autocmd") " Some Debian-specific things