summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org17
-rw-r--r--dwm/#pre_stow.sh#4
-rw-r--r--email/#pre_stow.sh#5
-rw-r--r--i3/#pre_stow.sh#3
-rw-r--r--initFolders.sh8
-rw-r--r--qutebrowser/#setup.sh#3
-rw-r--r--scripts/#pre_stow.sh#3
-rwxr-xr-xstows22
-rw-r--r--vim/#pre_stow.sh#3
9 files changed, 59 insertions, 9 deletions
diff --git a/README.org b/README.org
index 8711e87..731db65 100644
--- a/README.org
+++ b/README.org
@@ -10,4 +10,19 @@
To install a package or module one can run.
: stow emacs
-
+
+** Stows script
+
+ This scripts runs pre and post setup scripts.
+
+ These scripts are in encased in # because it's in stow's default ignore :-D.
+
+ To use the wrapper script run.
+
+ : stows emacs
+
+ To pass flags to package scripts put them before the package
+
+ : stows vim -D emacs
+
+ This will setup vim and delete emacs.
diff --git a/dwm/#pre_stow.sh# b/dwm/#pre_stow.sh#
new file mode 100644
index 0000000..baacda6
--- /dev/null
+++ b/dwm/#pre_stow.sh#
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Create symlinked status dir
+mkdir -p ~/Scripts/enMenuScripts
diff --git a/email/#pre_stow.sh# b/email/#pre_stow.sh#
new file mode 100644
index 0000000..f4050ec
--- /dev/null
+++ b/email/#pre_stow.sh#
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# make needed folders
+mkdir -p ~/Scripts
+mkdir -p ~/.config/alot
diff --git a/i3/#pre_stow.sh# b/i3/#pre_stow.sh#
new file mode 100644
index 0000000..bd600f1
--- /dev/null
+++ b/i3/#pre_stow.sh#
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+mkdir ~/.config/i3
diff --git a/initFolders.sh b/initFolders.sh
deleted file mode 100644
index ef06c99..0000000
--- a/initFolders.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-# Add folders that should not be symlinked by stow
-
-mkdir -p ~/Scripts
-mkdir -p ~/Scripts/enMenuScripts
-mkdir -p ~/.config/qutebrowser
-mkdir -p ~/.config/nvim
-mkdir -p ~/.config/i3
-mkdir -p ~/.config/alot
diff --git a/qutebrowser/#setup.sh# b/qutebrowser/#setup.sh#
new file mode 100644
index 0000000..7e97e93
--- /dev/null
+++ b/qutebrowser/#setup.sh#
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+mkdir -p ~/.config/qutebrowser
diff --git a/scripts/#pre_stow.sh# b/scripts/#pre_stow.sh#
new file mode 100644
index 0000000..c972151
--- /dev/null
+++ b/scripts/#pre_stow.sh#
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+mkdir -p ~/Scripts
diff --git a/stows b/stows
new file mode 100755
index 0000000..e19639b
--- /dev/null
+++ b/stows
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+flags=""
+
+# Allow for flags into the setup things
+while test $# != 0
+do
+ case "$1" in
+ -D)
+ # Collect flag
+ flags="$flags -D" ;;
+ *)
+ # Run pre
+ sh "./$1/#pre_stow.sh#" $flags
+ # Run stow
+ stow $flags $1
+ # Run post
+ sh "./$1/#post_stow.sh#" $flags ;;
+ esac
+ shift
+done
+
diff --git a/vim/#pre_stow.sh# b/vim/#pre_stow.sh#
new file mode 100644
index 0000000..095ef6e
--- /dev/null
+++ b/vim/#pre_stow.sh#
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+mkdir -p ~/.config/nvim