Move index and out inside the user directory
This commit is contained in:
parent
3eae92bdc4
commit
317409f6ac
@ -10,7 +10,7 @@
|
|||||||
with garlicTools;
|
with garlicTools;
|
||||||
|
|
||||||
let
|
let
|
||||||
garlicOut = "/mnt/garlic/out";
|
garlicPrefix = "/mnt/garlic";
|
||||||
garlicTemp = "/tmp/garlic";
|
garlicTemp = "/tmp/garlic";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -22,7 +22,7 @@ in
|
|||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
inherit garlicOut garlicTemp sshHost;
|
inherit garlicPrefix garlicTemp sshHost;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
substituteAllInPlace garlic
|
substituteAllInPlace garlic
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
|
|
||||||
garlicOut=@garlicOut@
|
garlicPrefix=@garlicPrefix@
|
||||||
garlicTemp=@garlicTemp@
|
garlicTemp=@garlicTemp@
|
||||||
sshHost=@sshHost@
|
sshHost=@sshHost@
|
||||||
PATH=@PATH@
|
PATH=@PATH@
|
||||||
@ -61,7 +61,7 @@ checkExperiment() {
|
|||||||
do_fetch() {
|
do_fetch() {
|
||||||
expName=$(basename $experiment)
|
expName=$(basename $experiment)
|
||||||
user=$(ssh -G "$sshHost" | awk '/^user /{print $2}')
|
user=$(ssh -G "$sshHost" | awk '/^user /{print $2}')
|
||||||
exp=$garlicOut/$user/$expName
|
exp=$garlicPrefix/$user/out/$expName
|
||||||
|
|
||||||
if [ ! -e "$exp" ]; then
|
if [ ! -e "$exp" ]; then
|
||||||
echo "missing experiment: $exp"
|
echo "missing experiment: $exp"
|
||||||
|
@ -11,9 +11,9 @@ fi
|
|||||||
user=$(id -un)
|
user=$(id -un)
|
||||||
group=$(id -gn)
|
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"
|
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"
|
mkdir -p "$GARLIC_INDEX"
|
||||||
export GARLIC_USER="$user"
|
export GARLIC_USER="$user"
|
||||||
cd "$GARLIC_OUT"
|
cd "$GARLIC_OUT"
|
||||||
|
@ -74,10 +74,10 @@ stdenv.mkDerivation {
|
|||||||
rm -f "\$GARLIC_INDEX/${conf.unitName}" \
|
rm -f "\$GARLIC_INDEX/${conf.unitName}" \
|
||||||
"\$GARLIC_INDEX/${conf.expName}"
|
"\$GARLIC_INDEX/${conf.expName}"
|
||||||
|
|
||||||
ln -Tfs "../../out/\$GARLIC_UNIT" \
|
ln -Tfs "../out/\$GARLIC_UNIT" \
|
||||||
"\$GARLIC_INDEX/${conf.unitName}"
|
"\$GARLIC_INDEX/${conf.unitName}"
|
||||||
|
|
||||||
ln -Tfs "../../out/\$GARLIC_EXPERIMENT" \
|
ln -Tfs "../out/\$GARLIC_EXPERIMENT" \
|
||||||
"\$GARLIC_INDEX/${conf.expName}"
|
"\$GARLIC_INDEX/${conf.expName}"
|
||||||
|
|
||||||
if [ -e "\$GARLIC_UNIT" ]; then
|
if [ -e "\$GARLIC_UNIT" ]; then
|
||||||
|
Reference in New Issue
Block a user