aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-06-24 17:23:36 +0200
committerKarel Kočí <cynerd@email.cz>2018-06-24 17:23:36 +0200
commit3511984027aa0890572e4a1156b548faec358f63 (patch)
treefd73d38851a25415894af508cbe5ddd17fbc1354 /install
parenta44393cbdd488bc00832000cb397239b45cbee51 (diff)
downloadshellrc-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.
Diffstat (limited to 'install')
-rwxr-xr-xinstall12
1 files changed, 10 insertions, 2 deletions
diff --git a/install b/install
index 2305d3f..55d3cfd 100755
--- a/install
+++ b/install
@@ -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"