aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2019-09-10 20:57:55 -0300
committerMatias Linares <matiaslina@gmail.com>2019-09-10 20:57:55 -0300
commit0763564eedc459a98e63a65f7ffee8ad37100fe7 (patch)
treed6df96cc98f27c1f7a0eaa4a99d62b5c15552f7c /install.sh
parenta865776fb4c44f145832b04a4088d006fd8cba3d (diff)
downloaddotwm-0763564eedc459a98e63a65f7ffee8ad37100fe7.tar.gz
use dirs crate
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/install.sh b/install.sh
index 4c16960..55600ac 100755
--- a/install.sh
+++ b/install.sh
@@ -1,6 +1,13 @@
#!/bin/bash
-PREFIX=/usr/local
+echo $@
+if [[ x"$1" = "x--prefix" ]]
+then
+ PREFIX=$2
+else
+ PREFIX=/usr/local
+fi
+
BINDIR=${PREFIX}/bin
DATADIR=${PREFIX}/share
MANDIR=${DATADIR}/man
@@ -9,7 +16,7 @@ DOCDIR=${DATADIR}/doc/dotwm
EXAMPLEDIR=${DOCDIR}/examples
SYSCONFDIR=/etc
CONFIGDIR=${SYSCONFDIR}/xdg/dotwm
-XSESSIONDIR=${DATADIR}/share/xsessions
+XSESSIONDIR=${DATADIR}/xsessions
fail_dependencies() {
cat <<EOF
@@ -34,11 +41,6 @@ _build() {
}
_install() {
- echo $@
- if [[ x"$1" = "x--prefix" ]]
- then
- PREFIX=$2
- fi
echo "Base dir for installation: ${PREFIX}"
install -m 755 target/release/dotwm $BINDIR
install -m 644 dotwm.1 ${MAN1DIR}