diff options
author | Karel Kočí <cynerd@email.cz> | 2018-06-24 17:23:36 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-06-24 17:23:36 +0200 |
commit | 3511984027aa0890572e4a1156b548faec358f63 (patch) | |
tree | fd73d38851a25415894af508cbe5ddd17fbc1354 | |
parent | a44393cbdd488bc00832000cb397239b45cbee51 (diff) | |
download | shellrc-3511984027aa0890572e4a1156b548faec358f63.tar.gz shellrc-3511984027aa0890572e4a1156b548faec358f63.tar.bz2 shellrc-3511984027aa0890572e4a1156b548faec358f63.zip |
Allow no base install
This is required for subpackages creation. Base files would otherwise be
included in all subpackages.
-rwxr-xr-x | install | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -3,6 +3,7 @@ set -e cd "$(dirname "$0")" I_PREFIX=/ +U_BASE=true U_BASH=false U_ZSH=false @@ -18,6 +19,8 @@ while [ $# -gt 0 ]; do echo " Install bash configuration" echo " -z, --zsh" echo " Install zsh configuration" + echo " --no-base" + echo " Do not install base only bash or zsh is installed" echo " --prefix PATH" echo " Install prefix (in default set to /)" exit 0 @@ -28,6 +31,9 @@ while [ $# -gt 0 ]; do --zsh|-z) U_ZSH=true ;; + --no-base) + U_BASE=false + ;; --prefix) shift I_PREFIX="$1" @@ -41,8 +47,10 @@ while [ $# -gt 0 ]; do done # Install shellrc -mkdir -p "$I_PREFIX/etc" -cp -r shellrc.d "$I_PREFIX/etc/shellrc.d" +if $U_BASE; then + mkdir -p "$I_PREFIX/etc" + cp -r shellrc.d "$I_PREFIX/etc/shellrc.d" +fi if $U_BASH; then mkdir -p "$I_PREFIX/etc/bash" |