parent
5d7afce571
commit
78e033427f
@ -0,0 +1,33 @@ |
||||
#!/bin/bash |
||||
|
||||
script="$( realpath -e "${BASH_SOURCE[0]}" )" |
||||
dir="$( dirname "$script" )" |
||||
hostdir="$dir"/per-host/"$(hostname)" |
||||
|
||||
if [[ ! -d "$hostdir" ]]; then |
||||
echo "Copying data from template..." |
||||
cp -T -a "$dir"/per-host/template "$hostdir" |
||||
fi |
||||
|
||||
if [[ ! -z "$2" ]]; then |
||||
relpath=$( realpath --no-symlinks --relative-to "$hostdir" "$2" ) |
||||
fi |
||||
|
||||
if [[ -z "$1" ]]; then |
||||
find "$hostdir" \ |
||||
\( \ |
||||
\( -type f -or -type l \) \ |
||||
-execdir "$script" link '{}' \; \ |
||||
\) -or \( \ |
||||
-type d \ |
||||
-not -samefile "$hostdir" \ |
||||
-execdir "$script" mkdir '{}' \; \ |
||||
\) |
||||
chmod 700 ~/.ssh |
||||
elif [[ "$1" == "link" ]]; then |
||||
ln --symbolic "$hostdir/$relpath" ~/"$relpath" |
||||
elif [[ "$1" == "mkdir" ]]; then |
||||
mkdir -p ~/"$relpath" |
||||
else |
||||
echo "unknown command $1" |
||||
fi |
@ -0,0 +1,3 @@ |
||||
source ~/.bash_aliases-common |
||||
|
||||
auto_tmux |
@ -0,0 +1 @@ |
||||
../../bash_aliases.sh |
@ -0,0 +1 @@ |
||||
$include ~/.inputrc-common |
@ -0,0 +1 @@ |
||||
../../inputrc |
@ -0,0 +1 @@ |
||||
../../../ssh/rc |
@ -0,0 +1 @@ |
||||
../../../ssh/authorized-keys |
@ -0,0 +1,2 @@ |
||||
#!/bin/sh |
||||
source .rc-common |
@ -0,0 +1 @@ |
||||
source ~/.tmux.conf-common |
@ -0,0 +1 @@ |
||||
../../tmux.conf |
@ -0,0 +1 @@ |
||||
source ~/.vimrc-common |
@ -0,0 +1 @@ |
||||
../../vimrc |
@ -0,0 +1,10 @@ |
||||
source ~/.bash_aliases-common |
||||
|
||||
copy_func tmux_init_main tmux_init_main_base |
||||
|
||||
function tmux_init_main() { |
||||
tmux_init_main_base |
||||
tmux -2 new-window -d -t "Main Screen:1" -n "Server" "~/current-server/mark2/start; ~/current-server/mark2/attach" |
||||
} |
||||
|
||||
auto_tmux |
@ -0,0 +1 @@ |
||||
../../bash_aliases.sh |
@ -0,0 +1 @@ |
||||
$include ~/.inputrc-common |
@ -0,0 +1 @@ |
||||
../../inputrc |
@ -0,0 +1 @@ |
||||
../../../ssh/rc |
@ -0,0 +1 @@ |
||||
../../../ssh/authorized_keys |
@ -0,0 +1,2 @@ |
||||
#!/bin/sh |
||||
source ~/.ssh/.rc-common |
@ -0,0 +1,2 @@ |
||||
source ~/.tmux.conf-common |
||||
set -g base-index 2 |
@ -0,0 +1 @@ |
||||
../../tmux.conf |
@ -0,0 +1 @@ |
||||
source ~/.vimrc-common |
@ -0,0 +1 @@ |
||||
../../vimrc |
@ -0,0 +1,3 @@ |
||||
source ~/.bash_aliases-common |
||||
|
||||
auto_tmux |
@ -0,0 +1 @@ |
||||
../../bash_aliases.sh |
@ -0,0 +1 @@ |
||||
$include ~/.inputrc-common |
@ -0,0 +1 @@ |
||||
../../inputrc |
@ -0,0 +1 @@ |
||||
../../../ssh/rc |
@ -0,0 +1 @@ |
||||
../../../ssh/authorized_keys |
@ -0,0 +1,2 @@ |
||||
#!/bin/sh |
||||
source ~/.ssh/.rc-common |
@ -0,0 +1 @@ |
||||
source ~/.tmux.conf-common |
@ -0,0 +1 @@ |
||||
../../tmux.conf |
@ -0,0 +1 @@ |
||||
source ~/.vimrc-common |
@ -0,0 +1 @@ |
||||
../../vimrc |
@ -0,0 +1 @@ |
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINsxWR5n8WREoU6d8diPS1tbE6VVvCOSFutgPybz8ZyW ed25519-key-20190920 |
@ -1,8 +1,8 @@ |
||||
#!/bin/sh |
||||
|
||||
source /etc/ssh/sshrc |
||||
|
||||
if [ -n "$SSH_AUTH_SOCK" ]; then |
||||
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock |
||||
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock |
||||
fi |
||||
|
||||
source /etc/ssh/sshrc |
@ -1,3 +1,4 @@ |
||||
" link destination: $HOME/.vimrc |
||||
" Enable modern Vim features not compatible with Vi spec. |
||||
set nocompatible |
||||
|
Loading…
Reference in new issue