From 8dd4c661123dff14505a19c35fd314984e99fdf8 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Thu, 16 Feb 2017 17:59:04 +0000 Subject: add sha-bang and HASHSTACK_DIR environment variable --- tweed.hashdist.post-install | 10 ++++++++-- 1 file 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 # @@ -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" -- cgit