Ensure configuration consistency run in the very beginning and do not process empty apps and plugins.

This commit is contained in:
2021-04-03 17:25:00 +05:00
parent 858db76ad6
commit 0266f1af31
3 changed files with 17 additions and 9 deletions
+9 -9
View File
@@ -1,4 +1,13 @@
# Configuration file loader.
log 1 "Checking for configuration consistency..."
for file in `find ${CONFIG_PATH}/zsh/defaults/ -maxdepth 1 -type f -exec basename {} \; | sort`; do
if [ ! -f "${HOME}/.zsh-config.d/${file}" ]; then
cp "${CONFIG_PATH}/zsh/defaults/${file}" "${HOME}/.zsh-config.d/${file}"
log 0 "New configuration file '${file}' copied to your home directory (${HOME}/.zsh-config.d/)."
log 0 "Don't forget to take a look and configure, if neccessary!"
fi
done
if [ ! -d ${HOME}/.zsh-config.d/ ]; then
log 1 "Copying configuration to user's home directory..."
cp -R "${CONFIG_PATH}/zsh/defaults/" ${HOME}/.zsh-config.d
@@ -9,12 +18,3 @@ for file in `find ${HOME}/.zsh-config.d/ -maxdepth 1 -type f -exec basename {} \
log 1 "Loading configuration file: ${file}"
source "${HOME}/.zsh-config.d/${file}"
done
log 1 "Checking for configuration consistency..."
for file in `find ${CONFIG_PATH}/zsh/defaults/ -maxdepth 1 -type f -exec basename {} \; | sort`; do
if [ ! -f "${HOME}/.zsh-config.d/${file}" ]; then
cp "${CONFIG_PATH}/zsh/defaults/${file}" "${HOME}/.zsh-config.d/${file}"
log 0 "New configuration file '${file}' copied to your home directory (${HOME}/.zsh-config.d/)."
log 0 "Don't forget to take a look and configure, if neccessary!"
fi
done