summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xinstall21
-rw-r--r--install.config19
3 files changed, 22 insertions, 19 deletions
diff --git a/.gitignore b/.gitignore
index a97f71b..40afb36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
.cgdb/readline_history.txt
*.swp
+install.config
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)
diff --git a/install.config b/install.config
deleted file mode 100644
index 67b7bdb..0000000
--- a/install.config
+++ /dev/null
@@ -1,19 +0,0 @@
-# dotfiles -- install.config
-# author: johannst
-# line format: [yYnN] - <config_tag>
-# lines not starting with [yYnN] are ignored
-
-n - bashrc
-n - gdb
-n - cgdb
-n - conkyrc
-n - gitconfig
-n - tmux.conf
-n - vimrc
-n - emacs
-n - Xresources
-n - i3config
-n - i3status
-n - i3blocks
-n - termite
-n - zshrc