summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2019-08-24 14:17:37 +0200
committerjohannst <johannes.stoelp@gmail.com>2019-08-24 14:17:37 +0200
commitc0eb40dc25e646ab0dd20c557976e8c576c54f9e (patch)
tree1b8d1ac165899ea19f06d378fa847d655deeb043 /install
parent52019030f2c31f78686e308a30dcaec7e5d4178d (diff)
downloaddotfiles-c0eb40dc25e646ab0dd20c557976e8c576c54f9e.tar.gz
dotfiles-c0eb40dc25e646ab0dd20c557976e8c576c54f9e.zip
generate install config && deleted install.config
Diffstat (limited to 'install')
-rwxr-xr-xinstall21
1 files changed, 21 insertions, 0 deletions
diff --git a/install b/install
index 5d5d6f4..d3f0c39 100755
--- a/install
+++ b/install
@@ -254,6 +254,10 @@ function zshrcInstaller() {
#{{{ Installer Main Loop
function main() {
+ [[ -f $gInstallConfigFile ]] || {
+ generateInstallConfigFile $gInstallConfigFile
+ }
+
# parse gInstallConfigFile to see what should be installed
local configToInstall=()
while read line; do
@@ -286,6 +290,23 @@ function main() {
#}}}
#{{{ Installer Core
+generateInstallConfigFile () {
+ local config_fname=$1
+ : > $config_fname
+
+ echo "No config found, about to generate new config >> $config_fname <<"
+ for conf in ${gToolsConfig[@]}; do
+ local conf=$(echo $conf | cut -d':' -f1)
+ echo "Install $conf? [yY/nN]"
+ read install
+ [[ $install =~ ^[^yY]?$ ]] && {
+ echo "n - $conf" >> $config_fname
+ } || {
+ echo "y - $conf" >> $config_fname
+ }
+ done
+}
+
installConfig() {
local config=$1
local binary=$(getDepenentBinaryName $config)