wip
This commit is contained in:
parent
0168c5cefb
commit
3a8ad3022e
@ -1,6 +1,6 @@
|
||||
[user]
|
||||
email = yuri@yrz.am
|
||||
name = Yuri Zamyatin
|
||||
email = {{ .user.GIT_USER_EMAIL }}
|
||||
name = {{ .user.GIT_USER_NAME }}
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[pull]
|
||||
|
@ -9,6 +9,21 @@ cd "$(dirname "$0")"
|
||||
umask 002
|
||||
[[ "$(id -u)" == "0" ]] && echo "ERROR: wrong user" >&1 && exit 1
|
||||
|
||||
########## init config #########
|
||||
if [[ ! -f ~/.config/workspace.conf ]]; then
|
||||
mkdir -p ~/.config
|
||||
cp config/workspace.conf ~/.config
|
||||
fi
|
||||
while read -r line; do
|
||||
param="${line::-1}"
|
||||
if ! grep -qE "^$param=.+" ~/.config/workspace.conf; then
|
||||
echo "ERROR: ~/.config/workspace.conf - missing $param"
|
||||
CONFIG_INVALID=1
|
||||
fi
|
||||
done < config/workspace.conf
|
||||
[[ $CONFIG_INVALID ]] && exit 1
|
||||
################################
|
||||
|
||||
####### file structure #########
|
||||
USER_DIRS=(
|
||||
##### xdg #####
|
||||
@ -46,7 +61,8 @@ gomplate --input-dir config \
|
||||
--exclude-processing "!*.tmpl" \
|
||||
--plugin jq=/bin/jq \
|
||||
-c theme=config/theme.json \
|
||||
-c user="$HOME/.workspace.conf"
|
||||
-c user="file:///$HOME/.config/workspace.conf?type=application/x-env" \
|
||||
--exclude /workspace.conf
|
||||
|
||||
ln -sf ~/.config/bash/bashrc ~/.bashrc
|
||||
ln -sf ~/.config/profile ~/.profile
|
||||
|
Loading…
Reference in New Issue
Block a user