Compare commits

..

No commits in common. "18daaaa0d7d31bf403536f9d9beb1758db2c1c69" and "32c1ed5c4bc0913adc175fb18b1c9251acc7b606" have entirely different histories.

2 changed files with 7 additions and 37 deletions

View File

@ -2,10 +2,10 @@
{type,app}.
{modules,[]}.
{prefix,"gmconfig"}.
{author,"Ulf Wiger"}.
{desc,"Configuration management support"}.
{package_id,{"uwiger","gmconfig",{0,1,2}}}.
{deps,[{"uwiger","setup",{2,2,4}}]}.
{author,"Ulf Wiger"}.
{package_id,{"uwiger","gmconfig",{0,1,0}}}.
{deps,[{"uwiger","setup",{2,2,3}}]}.
{key_name,none}.
{a_email,"ulf@wiger.net"}.
{c_email,"ulf@wiger.net"}.

View File

@ -2,41 +2,11 @@
set -e
APP=$(basename "$PWD")
SRC="_build/default/lib/$APP"
DST="$PWD/_build/zomp/lib/$APP"
IGNORE_FILE="zomp.ignore"
mkdir -p "$DST"
# Remove broken symlinks
find "$SRC" -type l ! -exec test -e {} \; -delete || true
# Build ignore matcher
IGNORE_TEMP=$(mktemp)
trap "rm -f $IGNORE_TEMP" EXIT
# Expand globs in zomp.ignore to patterns suitable for grep
if [ -e "$IGNORE_FILE" ]; then
grep -v '^\s*#' "$IGNORE_FILE" | sed 's#/#\\/#g' | sed 's/\./\\./g' | sed 's/\*/.*/g' > "$IGNORE_TEMP"
fi
# Copy Git-tracked and Zomp-allowed files
git ls-files -z | while IFS= read -r -d '' file; do
# Skip if ignored
echo "$file" | grep -Eq -f "$IGNORE_TEMP" && continue
# Only copy if file exists in the build dir
if [ -e "$SRC/$file" ]; then
mkdir -p "$DST/$(dirname "$file")"
cp -a "$SRC/$file" "$DST/$file"
fi
done
rm "$IGNORE_TEMP"
# Copy metadata
find "$SRC" -type l ! -exec test -e {} \; -delete
cp -aR -L "$SRC/." "$DST/"
cp "$PWD/zomp.meta" "$DST/"
cp "$PWD/Emakefile" "$DST/"
# Clean up beam files just in case
[ -d "$DST/ebin" ] && find "$DST/ebin" -name '*.beam' -exec rm -f {} + || true
cp "$PWD/Emakefile" "$DST"
rm "$DST"/ebin/*.beam