aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tweed.hashdist.post-install10
1 files changed, 8 insertions, 2 deletions
diff --git a/tweed.hashdist.post-install b/tweed.hashdist.post-install
index 1a4ba58..ddd5ead 100644
--- a/tweed.hashdist.post-install
+++ b/tweed.hashdist.post-install
@@ -1,3 +1,5 @@
+#!/bin/sh
+#
# Tweed --- Package management for engineering software
# Copyright (C) 2016 Paul Garlick <pgarlick@tourbillion-technology.com>
#
@@ -20,10 +22,14 @@ mkdir -p $HOME/.hashdist-profile
# set configuration filename
CONFIG_FILE=$HOME/.hashdist-profile/hashdist.sh
-# read link to HashDist profile and confirm HashDist store location
-PROFILE=default
+# remove previous configuration file (if it exists)
+rm -f $CONFIG_FILE
+
+# read link to profile in HashStack directory
+PROFILE="$HASHSTACK_DIR/default"
PROFILE=$(readlink $PROFILE)
PROFILE=$(basename $PROFILE)
+# confirm HashDist store location
HASHDIST_BUILD_STORE=$(grep build_stores: -A1 ~/.hashdist/config.yaml | tail -1 | cut -f2 -d: | tr -d ' ')
if [ "x$HASHDIST_BUILD_STORE" = "x./bld" ]; then
HASHDIST_BUILD_STORE="$HOME/.hashdist/bld"