improve build process; add documentation
This commit is contained in:
13
src/build.sh
13
src/build.sh
@ -4,11 +4,17 @@
|
||||
|
||||
dir=$(readlink -f "$(dirname "$0")")
|
||||
|
||||
jsdir=$(readlink -f "$dir/../js")
|
||||
jsdir=$(readlink -f "$dir/../dist/js")
|
||||
|
||||
if ! cd "$dir" ; then
|
||||
echo "ERROR: Could not change working directory; aborted." >&2 ;
|
||||
exit 1 ;
|
||||
elif ! mkdir -p "$jsdir" ; then
|
||||
echo "ERROR: Could not create directory $jsdir; aborted." >&2 ;
|
||||
exit 1 ;
|
||||
elif ! type yui-compressor > /dev/null ; then
|
||||
echo "ERROR: Executable \"yui-compressor\" not found in PATH; aborted." >&2 ;
|
||||
exit 1 ;
|
||||
fi
|
||||
|
||||
echo '/*
|
||||
@ -29,11 +35,6 @@ MyPlayer
|
||||
Copyright (c) 2014 - 2024 tilt@linuxfoo.de MIT License
|
||||
*/' > "$jsdir"/myplayer.min.js
|
||||
|
||||
type yui-compressor > /dev/null || {
|
||||
echo "ERROR: Executable \"yui-compressor\" not found in PATH; aborted." >&2 ;
|
||||
exit 1 ;
|
||||
}
|
||||
|
||||
rm -f "$jsdir"/myplayer.min.js
|
||||
|
||||
for js in \
|
||||
|
Reference in New Issue
Block a user