nix/tests/functional/bash-profile.sh

12 lines
402 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2012-09-13 21:58:14 +00:00
source common.sh
sed -e "s|@localstatedir@|$TEST_ROOT/profile-var|g" -e "s|@coreutils@|$coreutils|g" < ../../scripts/nix-profile.sh.in > "$TEST_ROOT"/nix-profile.sh
2016-04-13 14:43:33 +00:00
user=$(whoami)
rm -rf "$TEST_HOME" "$TEST_ROOT/profile-var"
mkdir -p "$TEST_HOME"
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh; set"
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh" # test idempotency