#!/bin/bash
OLD_CWD="${PWD}"
TMP=$(mktemp -d)
echo Files extracted to "${TMP}"
mkdir -p "${TMP}/."

cat > "${TMP}/./rose-app.conf" <<__ICI__
[command]
default=true

[file:git-source]
source=git:${TMP}/src::./::main
__ICI__

mkdir -p "${TMP}/src"

# Create an empty repo
cd "${TMP}/src"
git init .
ln -s missing link
git add .
git commit -a -m "Add broken link"

mkdir -p "${TMP}/run"
cd "${TMP}/run"
rose app-run -C ../ --debug

cd "${OLD_CWD}"
