Move index and out inside the user directory

This commit is contained in:
Rodrigo Arias 2020-10-29 18:07:06 +01:00
parent 3eae92bdc4
commit 317409f6ac
4 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@
with garlicTools;
let
garlicOut = "/mnt/garlic/out";
garlicPrefix = "/mnt/garlic";
garlicTemp = "/tmp/garlic";
in
stdenv.mkDerivation {
@ -22,7 +22,7 @@ in
src = ./.;
inherit garlicOut garlicTemp sshHost;
inherit garlicPrefix garlicTemp sshHost;
installPhase = ''
substituteAllInPlace garlic

View File

@ -1,6 +1,6 @@
#!/bin/bash
#!/bin/bash -e
garlicOut=@garlicOut@
garlicPrefix=@garlicPrefix@
garlicTemp=@garlicTemp@
sshHost=@sshHost@
PATH=@PATH@
@ -61,7 +61,7 @@ checkExperiment() {
do_fetch() {
expName=$(basename $experiment)
user=$(ssh -G "$sshHost" | awk '/^user /{print $2}')
exp=$garlicOut/$user/$expName
exp=$garlicPrefix/$user/out/$expName
if [ ! -e "$exp" ]; then
echo "missing experiment: $exp"

View File

@ -11,9 +11,9 @@ fi
user=$(id -un)
group=$(id -gn)
export GARLIC_OUT="/gpfs/projects/bsc15/garlic/out/$user"
export GARLIC_OUT="/gpfs/projects/bsc15/garlic/$user/out"
mkdir -p "$GARLIC_OUT"
export GARLIC_INDEX="/gpfs/projects/bsc15/garlic/index/$user"
export GARLIC_INDEX="/gpfs/projects/bsc15/garlic/$user/index"
mkdir -p "$GARLIC_INDEX"
export GARLIC_USER="$user"
cd "$GARLIC_OUT"

View File

@ -74,10 +74,10 @@ stdenv.mkDerivation {
rm -f "\$GARLIC_INDEX/${conf.unitName}" \
"\$GARLIC_INDEX/${conf.expName}"
ln -Tfs "../../out/\$GARLIC_UNIT" \
ln -Tfs "../out/\$GARLIC_UNIT" \
"\$GARLIC_INDEX/${conf.unitName}"
ln -Tfs "../../out/\$GARLIC_EXPERIMENT" \
ln -Tfs "../out/\$GARLIC_EXPERIMENT" \
"\$GARLIC_INDEX/${conf.expName}"
if [ -e "\$GARLIC_UNIT" ]; then