Skip to content

Instantly share code, notes, and snippets.

@mjuric
Created February 14, 2016 11:40
Show Gist options
  • Save mjuric/3e86b3896018376544d2 to your computer and use it in GitHub Desktop.
Save mjuric/3e86b3896018376544d2 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# From $EUPS_DIR, run as:
# (git reset --hard && git checkout master && ./configure --prefix=$PWD --with-eups=$PWD/stack) && ./testUserTag.sh
#
set -e
export EUPS_DIR=$(cd $(dirname $0); pwd)
rm -rf ~/.eups
# Create temporary stack directory
TS="$PWD/tmpstack"
rm -rf "$TS"
mkdir -p "$TS/ups_db"
# Create products
PS="$TS/DarwinX86"
mkdir -p "$PS/prod/a/ups" && touch "$PS/prod/a/ups/prod.table"
(
source "$EUPS_DIR/bin/setups.sh"
export EUPS_PATH="$TS"
eups list
eups --version
(
cd "$PS/prod/a"
eups declare -r . -t $USER prod
echo "After declaring the product with user tag:"
eups list
)
echo "Parent shell, w/o calling setups.sh:"
eups list
)
(
source "$EUPS_DIR/bin/setups.sh"
export EUPS_PATH="$TS"
echo "Sibling shell, after calling setups.sh:"
eups list
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment