-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsync-dotfiles.bash
More file actions
executable file
·42 lines (36 loc) · 910 Bytes
/
sync-dotfiles.bash
File metadata and controls
executable file
·42 lines (36 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# 各種ファイルをコピーする
function copy_file() {
local file_name="$1"
read -p "Do you want to copy [${file_name}] ? (y/n) : " yn
if [ "${yn}" = 'y' ]; then
cp "./${file_name}" "${HOME}/"
echo ' Copied'
else
echo ' Not Copied'
fi
}
echo "User Name : [$(whoami)]"
echo "User Home : [${HOME}]"
copy_file '.bash_profile'
copy_file '.bashrc'
copy_file '.bash_aliases'
copy_file '.git-completion.bash'
copy_file '.git-prompt.bash'
copy_file '.gitconfig'
copy_file '.hushlogin'
copy_file '.inputrc'
copy_file '.npmrc'
copy_file '.tigrc'
copy_file '.tmux.conf'
copy_file '.vimrc'
# Vim Colour
read -p "Do you want to copy [.vim/colors/monokai.vim] ? (y/n) : " yn
if [ "${yn}" = 'y' ]; then
mkdir -p "${HOME}/.vim/colors/"
cp './.vim/colors/monokai.vim' "${HOME}/.vim/colors/monokai.vim"
echo ' Copied'
else
echo ' Not Copied'
fi
echo 'Finished'