Created
August 11, 2017 20:14
-
-
Save loganmzz/7b2890894c90e11e7736c54ba70c0067 to your computer and use it in GitHub Desktop.
Compile many Ceylon source directories
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
#!/bin/sh | |
echo "Merging src-* directories into source" | |
rm -rf "source" | |
mkdir -p "source" | |
for source in src-*; do | |
echo " -- Merging ${source}" | |
cp -r "${source}"/* "source" | |
done | |
echo "Searching for modules" | |
modules="default" | |
for source_module in $(find src-* -name "module.ceylon" -exec dirname \{} \; | sort); do | |
source=$(echo "${source_module}" | cut -d '/' -f 1) | |
module=$(echo "${source_module}" | cut -d '/' -f '2-' | tr '/' '.') | |
echo " -- ${module} (from ${source})" | |
modules="${modules} ${module}" | |
done | |
echo "Compiling all modules" | |
ceylon compile "--encoding=UTF-8" $modules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment