Added experimental unison syncing commands
This commit is contained in:
parent
2ef92e8a78
commit
e3d89ba535
10
sync.sh
10
sync.sh
@ -1,4 +1,4 @@
|
|||||||
while getopts ":hbsdtclw" VALUE "$@"; do
|
while getopts ":hbsdtclwu" VALUE "$@"; do
|
||||||
if [ "$VALUE" = "h" ] ; then
|
if [ "$VALUE" = "h" ] ; then
|
||||||
echo "sync.sh syncs configuration files, applications, and Vim bundles between computers"
|
echo "sync.sh syncs configuration files, applications, and Vim bundles between computers"
|
||||||
echo " -h Shows this help"
|
echo " -h Shows this help"
|
||||||
@ -81,7 +81,13 @@ while getopts ":hbsdtclw" VALUE "$@"; do
|
|||||||
sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux
|
sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux
|
||||||
sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf
|
sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf
|
||||||
sudo vi `which wemux` +"execute \"normal gg/tmux\<CR>nnnea -2\<Esc>nea -2\<Esc>ggZZ\""
|
sudo vi `which wemux` +"execute \"normal gg/tmux\<CR>nnnea -2\<Esc>nea -2\<Esc>ggZZ\""
|
||||||
sudo vi /usr/local/etc/wemux.conf +":execute \"normal gg/host_list\<CR>nnww\""
|
sudo vi /usr/local/etc/wemux.conf +":execute \"normal gg/host_list\<CR>nnww\""
|
||||||
|
fi
|
||||||
|
if [ "$VALUE" = "u" ] ; then
|
||||||
|
sudo cp unison/unisonNetworkOnPortForward.sh /etc/network/if-up.d/
|
||||||
|
sudo vim /etc/rc.local +"execute \"normal /exit 0\<CR>Osudo -u stonewareslord ${PWD}/unison/unisonMonitor.sh &\<Esc>ggZZ\""
|
||||||
|
vim unison/unisonSync.sh +"execute \"gg/sync<CR>\$hci\"${PWD}\<Esc>ggZZ\""
|
||||||
|
echo "30 12 * * * ${PWD}/unison/unisonSync.sh" >> /etc/cron.d/unison
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Done syncing"
|
echo "Done syncing"
|
||||||
|
2
unison/unisonKill.sh
Normal file
2
unison/unisonKill.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
ps aux | grep unison | awk '{print $2}' | xargs kill -9
|
2
unison/unisonMonitor.sh
Normal file
2
unison/unisonMonitor.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
unison default ~/Documents ssh://stonewareslord@localhost:9922//home/vinh/Backup/Documents -repeat watch -times -logfile /tmp/unison.log
|
2
unison/unisonNetworkOnPortForward.sh
Normal file
2
unison/unisonNetworkOnPortForward.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
sudo -u stonewareslord ssh stonewareslord@austenwares.com -Y -C -f -N -L 9922:austenwares.com:22
|
3
unison/unisonSync.sh
Normal file
3
unison/unisonSync.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
sync="~/applications/sync/"
|
||||||
|
unison -batch -times $SYNC ssh://stonewareslord@localhost:9922//home/stonewareslord/unison/sync -logfile /tmp/unison.log
|
20
vimrc
20
vimrc
@ -18,7 +18,7 @@ nnoremap <C-d> <C-w>q
|
|||||||
nnoremap <F3> :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out<CR>
|
nnoremap <F3> :!make&&echo "Uploading robot code";wput ./PPC603gnu/src/Debug/src.out ftp://frc:frc@10.20.59.2/ni-rt/system/FRC_UserProgram.out<CR>
|
||||||
nnoremap G G$
|
nnoremap G G$
|
||||||
vnoremap G G$
|
vnoremap G G$
|
||||||
nnoremap <F6> :GundoToggle<CR>
|
nnoremap <F5> :GundoToggle<CR>
|
||||||
nnoremap <F8> :TagbarToggle<CR>
|
nnoremap <F8> :TagbarToggle<CR>
|
||||||
nnoremap + <C-a>
|
nnoremap + <C-a>
|
||||||
nnoremap - <C-x>
|
nnoremap - <C-x>
|
||||||
@ -56,7 +56,7 @@ vnoremap <silent> # :call VisualSelection('b')<CR>
|
|||||||
nnoremap <BS> :nohlsearch<CR>g<C-g>zo
|
nnoremap <BS> :nohlsearch<CR>g<C-g>zo
|
||||||
nnoremap U <C-r>
|
nnoremap U <C-r>
|
||||||
nnoremap K i<CR><Esc>k$
|
nnoremap K i<CR><Esc>k$
|
||||||
nnoremap <Enter> :w<CR>g<C-g>
|
nnoremap <Enter> :up<CR>g<C-g>
|
||||||
"nnoremap s c
|
"nnoremap s c
|
||||||
vnoremap gj j
|
vnoremap gj j
|
||||||
vnoremap gk k
|
vnoremap gk k
|
||||||
@ -108,6 +108,7 @@ nnoremap <Down> <C-w>W
|
|||||||
nnoremap <Left> :bp<CR>
|
nnoremap <Left> :bp<CR>
|
||||||
nnoremap <Right> :bn<CR>
|
nnoremap <Right> :bn<CR>
|
||||||
nnoremap <C-w>z <C-w>_<C-w>|
|
nnoremap <C-w>z <C-w>_<C-w>|
|
||||||
|
nnoremap <Leader>bn G?Bundle<CR>yyp$hdi'"+gP0Wl3d/\/<CR>x:nohlsearch<CR>:up<CR>:BundleInstall
|
||||||
nmap <C-Up> [e
|
nmap <C-Up> [e
|
||||||
nmap <C-Down> ]e
|
nmap <C-Down> ]e
|
||||||
vmap <C-Up> [egv
|
vmap <C-Up> [egv
|
||||||
@ -182,6 +183,13 @@ let g:php_refactor_command='php /usr/local/bin/refactor.phar'
|
|||||||
let loaded_matchit = 1
|
let loaded_matchit = 1
|
||||||
filetype off
|
filetype off
|
||||||
call vundle#rc()
|
call vundle#rc()
|
||||||
|
"Bundle 'Floobits/floobits-vim'
|
||||||
|
"Bundle 'tsaleh/vim-matchit'
|
||||||
|
"Bundle 'Shougo/neosnippet'
|
||||||
|
"Bundle 'honza/vim-snippets'
|
||||||
|
"Bundle 'msanders/snipmate.vim'
|
||||||
|
"Bundle 'vim-scripts/YankRing.vim'
|
||||||
|
"Bundle 'majutsushi/tagbar'
|
||||||
Bundle 'gmarik/vundle'
|
Bundle 'gmarik/vundle'
|
||||||
Bundle 'Chiel92/vim-autoformat'
|
Bundle 'Chiel92/vim-autoformat'
|
||||||
Bundle 'tpope/vim-surround'
|
Bundle 'tpope/vim-surround'
|
||||||
@ -212,13 +220,7 @@ Bundle 'tpope/vim-fugitive'
|
|||||||
Bundle 'tpope/vim-unimpaired'
|
Bundle 'tpope/vim-unimpaired'
|
||||||
Bundle 'kien/ctrlp.vim'
|
Bundle 'kien/ctrlp.vim'
|
||||||
Bundle 'godlygeek/tabular'
|
Bundle 'godlygeek/tabular'
|
||||||
"Bundle 'Floobits/floobits-vim'
|
Bundle 'tpope/vim-abolish'
|
||||||
"Bundle 'tsaleh/vim-matchit'
|
|
||||||
"Bundle 'Shougo/neosnippet'
|
|
||||||
"Bundle 'honza/vim-snippets'
|
|
||||||
"Bundle 'msanders/snipmate.vim'
|
|
||||||
"Bundle 'vim-scripts/YankRing.vim'
|
|
||||||
"Bundle 'majutsushi/tagbar'
|
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
if exists("+undofile")
|
if exists("+undofile")
|
||||||
if isdirectory($HOME . '/.vim/undo') == 0
|
if isdirectory($HOME . '/.vim/undo') == 0
|
||||||
|
Loading…
Reference in New Issue
Block a user