make 1.0.9 (code review)

parent 253cd9e4
......@@ -16,7 +16,7 @@ make_build () {
build_doc_html &&
do_gzip_man &&
build_end_message &&
touch ${PWD}/.make/build_done
touch "${PWD}"/.make/build_done
}
make_install () {
......@@ -47,11 +47,11 @@ CLEAN_DIRS=( doc/html )
make_clean () {
clean_message
for file in ${CLEAN_FILES[@]}; do
for file in "${CLEAN_FILES[@]}"; do
rm -f "${file}"
done
for dir in ${CLEAN_DIRS[@]}; do
for dir in "${CLEAN_DIRS[@]}"; do
rm -rf "${dir}"
done
}
......@@ -21,18 +21,18 @@ build_readme () {
build_doc_info () {
echo -e "\t${WHITE}+ ${MAGENTA} Info documentation"
makeinfo -I ${PWD}/doc/ doc/userdoc.texi -o doc/bashstyle.info
makeinfo -I "${PWD}"/doc/ doc/userdoc.texi -o doc/bashstyle.info
}
build_doc_html () {
echo -e "\t${WHITE}+ ${MAGENTA} HTML documenation"
makeinfo -I ${PWD}/doc/ --html doc/userdoc.texi -o doc/html
makeinfo -I "${PWD}"/doc/ --html doc/userdoc.texi -o doc/html
}
do_gzip_man () {
echo -e "\t${WHITE}+ ${MAGENTA} compressing manpages"
for manpage in ${MAN_FILES[@]}; do
gzip ${PWD}/${manpage/:*} -c > ${PWD}/${manpage/:*}.gz
for manpage in "${MAN_FILES[@]}"; do
gzip "${PWD}"/"${manpage/:*}" -c > "${PWD}"/"${manpage/:*}".gz
done
}
......@@ -58,15 +58,15 @@ update_po () {
echo -e "\t${WHITE}+ ${MAGENTA} gui translations"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgmerge -q -o i18n/${lang}/bs-ng.po \
i18n/${lang}/bs-ng.po i18n/bs-ng.pot >/dev/null
msgmerge -q -o i18n/"${lang}"/bs-ng.po \
i18n/"${lang}"/bs-ng.po i18n/bs-ng.pot >/dev/null
done
echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgmerge -q -o i18n/${lang}/nx-rc.po \
i18n/${lang}/nx-rc.po i18n/nx-rc.pot >/dev/null
msgmerge -q -o i18n/"${lang}"/nx-rc.po \
i18n/"${lang}"/nx-rc.po i18n/nx-rc.pot >/dev/null
done
fi
......@@ -77,15 +77,15 @@ generate_mo () {
echo -e "\t${WHITE}+ ${MAGENTA} gui translations"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgfmt --output-file=i18n/${lang}/bs-ng.mo \
i18n/${lang}/bs-ng.po
msgfmt --output-file=i18n/"${lang}"/bs-ng.mo \
i18n/"${lang}"/bs-ng.po
done
echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgfmt --output-file=i18n/${lang}/nx-rc.mo \
i18n/${lang}/nx-rc.po
msgfmt --output-file=i18n/"${lang}"/nx-rc.mo \
i18n/"${lang}"/nx-rc.po
done
}
......@@ -12,13 +12,13 @@
check_configure () {
if [[ ! -e .configure/results ]]; then
run_configure_message ; exit 1
else source ${PWD}/.configure/results
source ${PWD}/.make/files
else source "${PWD}"/.configure/results
source "${PWD}"/.make/files
fi
}
check_built () {
if [[ ! -e ${PWD}/.make/build_done ]]; then
if [[ ! -e "${PWD}"/.make/build_done ]]; then
run_make_build_message ; exit 1
fi
}
......
......@@ -12,7 +12,7 @@
post_install () {
if [[ ! ${DISABLE_POSTINSTALL} ]]; then
post_install_message
gtk-update-icon-cache -q -f ${PREFIX}/share/icons/hicolor
gtk-update-icon-cache -q -f "${PREFIX}"/share/icons/hicolor
fi
}
......@@ -23,19 +23,19 @@ post_remove () {
installdirs_create ()
{
echo -e "\t${WHITE}+${MAGENTA} directories"
mkdir -p ${DESTDIR}/${DATADIR}
for directory in ${DATADIR_LIST[@]}; do
mkdir -p ${DESTDIR}/${DATADIR}/${directory}
mkdir -p "${DESTDIR}"/"${DATADIR}"
for directory in "${DATADIR_LIST[@]}"; do
mkdir -p "${DESTDIR}"/"${DATADIR}"/"${directory}"
done
mkdir -p ${DESTDIR}/${LOCALEDIR}
for directory in ${LOCALEDIR_LIST[@]}; do
mkdir -p ${DESTDIR}/${LOCALEDIR}/${directory}
mkdir -p "${DESTDIR}"/"${LOCALEDIR}"
for directory in "${LOCALEDIR_LIST[@]}"; do
mkdir -p "${DESTDIR}"/"${LOCALEDIR}"/"${directory}"
done
mkdir -p ${DESTDIR}/${BINDIR}
mkdir -p ${DESTDIR}/${ICONDIR}
mkdir -p ${DESTDIR}/${PCDIR}
mkdir -p "${DESTDIR}"/"${BINDIR}"
mkdir -p "${DESTDIR}"/"${ICONDIR}"
mkdir -p "${DESTDIR}"/"${PCDIR}"
}
inst ()
......@@ -49,9 +49,9 @@ inst ()
DEST=${2/*:}
if [[ ${1} == man ]]; then
install -m${MODE} ${FILE}.gz ${DESTDIR}${DEST}
install -m"${MODE}" "${FILE}".gz "${DESTDIR}""${DEST}"
else
install -m${MODE} ${FILE} ${DESTDIR}${DEST}
install -m"${MODE}" "${FILE}" "${DESTDIR}""${DEST}"
fi
unset TYPE FILE DEST
......@@ -59,28 +59,28 @@ inst ()
install_bsng () {
echo -e "\t${WHITE}+${YELLOW} data files"
for file in ${DATA_FILES[@]} ${LOCALE_FILES[@]} \
${PC_FILES[@]} ${ICON_FILES[@]}; do
inst data ${file}
for file in "${DATA_FILES[@]}" "${LOCALE_FILES[@]}" \
"${PC_FILES[@]}" "${ICON_FILES[@]}"; do
inst data "${file}"
done
echo -e "\t${WHITE}+${GREEN} executable files"
for file in ${BIN_FILES[@]}; do
inst bin ${file}
for file in "${BIN_FILES[@]}"; do
inst bin "${file}"
done
echo -e "\t${WHITE}+${CYAN} documentation and manual pages"
for file in ${DOC_FILES[@]}; do
inst doc ${file}
for file in "${DOC_FILES[@]}"; do
inst doc "${file}"
done
for file in ${MAN_FILES[@]}; do
inst man ${file}
for file in "${MAN_FILES[@]}"; do
inst man "${file}"
done
}
remove_bsng () {
echo -e "\t${WHITE}+${RED} all files"
for file in ${REMOVE_FILES[@]}; do
rm -rf ${file}
for file in "${REMOVE_FILES[@]}"; do
rm -rf "${file}"
done
}
......@@ -188,6 +188,11 @@ maximum python versions for configure messages)
@item Make
@itemize @minus
@item 1.0.9
@itemize +
@item code review
@end itemize
@item 1.0.8
@itemize +
@item compress manpages upon @code{./make build}
......
......@@ -11,13 +11,13 @@
CF_MODULES=( base color )
MK_MODULES=( build install messages checks actions )
MK_VERSION=1.0.8
MK_VERSION=1.0.9
for mod in ${CF_MODULES[@]}; do
source .configure/${mod}
for mod in "${CF_MODULES[@]}"; do
source "${PWD}"/.configure/"${mod}"
done
for mod in ${MK_MODULES[@]}; do
source .make/${mod}
for mod in "${MK_MODULES[@]}"; do
source "${PWD}"/.make/"${mod}"
done
xcount=0
......@@ -41,7 +41,7 @@ else
* ) help_message ;;
esac
shift
xcount=$(($xcount+1))
xcount=$((xcount+1))
done
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment