mtcs-garage/configure

14 lines
410 B
Text
Raw Normal View History

2024-04-15 15:54:57 +00:00
#!/usr/bin/env bash
echo '(begin (with-output-to-file "'$PWD'/pid" (lambda () (write (getpid)))) (sleep 99))' | guix repl 2>&1 >/dev/null &
GUIX_PID=$(cat pid)
rm pid
GUILE_FOR_GUIX=$(readlink /proc/$GUIX_PID/exe)
kill $GUIX_PID
SCRIPT=$PWD/build-aux/rust-environment
sed -e "s|@GUILE@|$GUILE_FOR_GUIX|g" $SCRIPT.in > $SCRIPT.tmp
sed -e "s|@SRC@|$PWD|g" $SCRIPT.tmp > $SCRIPT
rm $SCRIPT.tmp
chmod +x $SCRIPT