## Create destination directory and cp files from build folder.

mkdir -p ${INSTALL_ROOT}/usr/share/jedit                          &&
cp -r ${SOURCE_DIRECTORY}/build/* ${INSTALL_ROOT}/usr/share/jedit &&
cp -r ${SOURCE_DIRECTORY}/icons   ${INSTALL_ROOT}/usr/share/jedit &&
chmod -R a+r ${INSTALL_ROOT}/usr/share/jedit                      &&

## Create an executable script opening jedit.jar

(
  echo "#!/bin/bash" &&
  echo "java -jar ${INSTALL_ROOT}/usr/share/jedit/jedit.jar"
) > ${INSTALL_ROOT}/usr/bin/jedit                                 &&
chmod a+x ${INSTALL_ROOT}/usr/bin/jedit
