-
-
Save colinmollenhour/59430611cb7c3dfde256ee6f68df7b0a to your computer and use it in GitHub Desktop.
Simple modman test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
MODMAN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/modman" | |
TMPDIR=$(mktemp -d) | |
function cleanup () { | |
rm -rfv "$TMPDIR" | |
} | |
trap cleanup EXIT | |
modmandir=".modman" | |
cd "$TMPDIR" | |
mkdir base | |
$MODMAN init | |
mkdir $modmandir/Test_Module | |
touch $modmandir/Test_Module/modman | |
echo "src/testfile testlink" > $modmandir/Test_Module/modman | |
mkdir $modmandir/Test_Module/src | |
touch $modmandir/Test_Module/src/testfile | |
echo "base" > $modmandir/Test_Module/.basedir # Same result as `modman clone Test_Module --basedir base <repo>` | |
$MODMAN deploy Test_Module || echo "ERROR - Deploying" | |
test -e base/testlink || echo "ERROR - base/testlink does not exist" | |
test -L base/testlink || echo "ERROR - base/testlink is not a link" | |
[[ "$(readlink -f base/testlink)" = "$(readlink -f $modmandir/Test_Module/src/testfile)" ]] || echo "ERROR - link destination is incorrect" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment