From c09dceb3997ef3e581a442ca9416e886cbeef304 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 14 Jul 2019 21:24:11 +0200 Subject: Replaced initFolders with setupscript system --- README.org | 17 ++++++++++++++++- dwm/#pre_stow.sh# | 4 ++++ email/#pre_stow.sh# | 5 +++++ i3/#pre_stow.sh# | 3 +++ initFolders.sh | 8 -------- qutebrowser/#setup.sh# | 3 +++ scripts/#pre_stow.sh# | 3 +++ stows | 22 ++++++++++++++++++++++ vim/#pre_stow.sh# | 3 +++ 9 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 dwm/#pre_stow.sh# create mode 100644 email/#pre_stow.sh# create mode 100644 i3/#pre_stow.sh# delete mode 100644 initFolders.sh create mode 100644 qutebrowser/#setup.sh# create mode 100644 scripts/#pre_stow.sh# create mode 100755 stows create mode 100644 vim/#pre_stow.sh# 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 -- cgit v1.2.3