1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-10 14:29:15 +00:00

init config file only if not existing

This commit is contained in:
deadc0de6
2017-03-29 19:04:53 +02:00
parent 7965a871d4
commit 0c7bb61025

View File

@@ -3,14 +3,16 @@
# Copyright (c) 2017, deadc0de6 # Copyright (c) 2017, deadc0de6
fold="dotfiles" fold="dotfiles"
conf="config.yaml"
# copy dotdrop entry point # copy dotdrop entry point
cat dotdrop/dotdrop.sh | sed 's#${cur}/dotdrop/dotdrop.py#${cur}/dotdrop/dotdrop/dotdrop.py#g' > dotdrop.sh cat dotdrop/dotdrop.sh | sed 's#${cur}/dotdrop/dotdrop.py#${cur}/dotdrop/dotdrop/dotdrop.py#g' > dotdrop.sh
chmod +x dotdrop.sh chmod +x dotdrop.sh
mkdir $fold mkdir $fold
# init config file if [ ! -e ${conf} ]; then
cat << EOF > config.yaml # init config file
cat << EOF > ${conf}
config: config:
backup: true backup: true
create: true create: true
@@ -18,3 +20,4 @@ config:
dotfiles: dotfiles:
profiles: profiles:
EOF EOF
fi