This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfginstall.conf
72 lines (52 loc) · 1.94 KB
/
cfginstall.conf
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Configuration for cfginstall.sh
# https://github.com/diademiemi/ConfigCloner
# The URL of the Git repository to clone
SET_CFG_REPO_URL="https://github.com/user/repo"
# This is where the bare repository will be cloned
SET_CFG_REPO_DIR=$HOME/.cfg/
# This is where the repository will be checked out.
# You will likely want this as $HOME! But you can change this for testing
SET_CFG_WORK_TREE=$HOME
# You shouldn't need to change these, this is what every clone includes or excludes by default
CHECKOUT_GLOBAL="
!README.md
!LICENSE
.gitignore
.gitmodules
.cfginstall.sh
.cfginstall.conf"
# List of options of what files to clone
OPTIONS=(FULL EXAMPLE)
# FULL option definitions
# Description of this option
FULL_INFO="full: Clone all config files in this repository"
# The /* means this will clone every file in this repo, except the README
FULL_CHECKOUT="/*"
# If you have defined any submodules, this will recursively update all of them
FULL_SUBMODULES="."
# EXAMPLE option definitions
# Description of this option
EXAMPLE_INFO="example: Clone VIM and ZSH"
# This will check out the .vimrc and .zshrc files with the .zsh directory
EXAMPLE_CHECKOUT="
.vimrc
.zshrc
.zsh"
# If you have defined any submodules located inside of .zsh in .gitmodules, it will recursively update these
EXAMPLE_SUBMODULES=".zsh"
# Command to run when updating, if you need many commands, make this run a script
# This installs vim-plug
EXAMPLE_COMMAND="curl -fsLo ${CFG_WORK_TREE}/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
# Config validation, don't remove! This makes sure all necessary arguments are set
for option in "${OPTIONS[@]}"; do
eval info=${option}_INFO
if [ -z "${!info}" ]; then
echo "_INFO is required for ${option}"
exit 1
fi
eval checkout=${option}_CHECKOUT
if [ -z "${!checkout}" ]; then
echo "_CHECKOUT is required for ${option}"
exit 1
fi
done