Make 1.0.4

parent daf6af0a
......@@ -12,7 +12,7 @@
make_build () {
check_configure &&
build_message &&
build &&
generate_mo &&
touch ${PWD}/.make/build_done
}
......@@ -30,5 +30,13 @@ make_remove () {
check_configure &&
check_root "remove" &&
remove_message &&
remove_bsng
remove_bsng &&
post_remove
}
make_clean () {
clean_message
for file in ${CLEAN_FILES[@]}; do
rm -f "${file}"
done
}
......@@ -9,17 +9,15 @@
# #
#########################################################
NUM_LANGS=${#APP_LANGUAGES[@]}
generate_pot () {
echo -e "\t${WHITE}+ ${MAGENTA} translation templates"
echo -e "\t${WHITE} * ${SMOOTHBLUE}[1/2]${WHITE} bs-ng.pot"
echo -e "\t${WHITE} *${YELLOW} bs-ng.pot"
intltool-extract --type=gettext/glade ui/bashstyle.ui >/dev/null
xgettext -L python --keyword=_ --keyword=N_ --output=i18n/bs-ng.pot \
ui/*.py ui/bashstyle.ui.h >/dev/null
echo -e "\t${WHITE} * ${SMOOTHBLUE}[2/2]${WHITE} nx-rc.pot"
echo -e "\t${WHITE} *${YELLOW} nx-rc.pot"
xgettext -o i18n/nx-rc.pot -L shell rc/nx-rc rc/settings/*-rc 2>/dev/null
}
......@@ -27,23 +25,21 @@ generate_pot () {
update_po () {
if [[ ! -f i18n/bs-ng.pot || ! -f i18n/nx-rc.pot ]]; then
echo -e "\n${RED}You need to run 'make pot' first!\n"
echo -e "\n${RED}You need to run './make pot' first!\n"
exit 1
else
local CUR_NUM=1
echo -e "\t${WHITE}+ ${MAGENTA} gui translations:"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} * ${SMOOTHBLUE}[${CUR_NUM}/${NUM_LANGS}]${WHITE} ${lang}"
local CUR_NUM=$((${CUR_NUM}+1))
msgmerge -q -o i18n/${lang}/bs-ng.po i18n/${lang}/bs-ng.po i18n/bs-ng.pot >/dev/null
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
done
local CUR_NUM=1
echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations:"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} * ${SMOOTHBLUE}[${CUR_NUM}/${NUM_LANGS}]${WHITE} ${lang}"
local CUR_NUM=$((${CUR_NUM}+1))
msgmerge -q -o i18n/${lang}/nx-rc.po i18n/${lang}/nx-rc.po i18n/nx-rc.pot >/dev/null
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
done
fi
......@@ -51,26 +47,18 @@ update_po () {
generate_mo () {
local CUR_NUM=1
echo -e "\t${WHITE}+ ${MAGENTA} gui translations:"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} * ${SMOOTHBLUE}[${CUR_NUM}/${NUM_LANGS}]${WHITE} ${lang}"
local CUR_NUM=$((${CUR_NUM}+1))
msgfmt --output-file=i18n/${lang}/bs-ng.mo i18n/${lang}/bs-ng.po
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgfmt --output-file=i18n/${lang}/bs-ng.mo \
i18n/${lang}/bs-ng.po
done
local CUR_NUM=1
echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations:"
for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} * ${SMOOTHBLUE}[${CUR_NUM}/${NUM_LANGS}]${WHITE} ${lang}"
local CUR_NUM=$((${CUR_NUM}+1))
msgfmt --output-file=i18n/${lang}/nx-rc.mo i18n/${lang}/nx-rc.po
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgfmt --output-file=i18n/${lang}/nx-rc.mo \
i18n/${lang}/nx-rc.po
done
}
build() {
generate_mo
}
......@@ -25,6 +25,6 @@ check_built () {
check_root () {
if [[ ${EUID} != 0 ]]; then
check_root_message ; exit 1
check_root_message "${1}" ; exit 1
fi
}
#!/bin/bash
#########################################################
# #
# This is BashStyle-NG #
# #
# Licensed under GNU GENERAL PUBLIC LICENSE v3 #
# #
# Copyright 2007 - 2015 Christopher Bratusek #
# #
#########################################################
clean () {
echo -e "\n${SMOOTHBLUE} cleaning up\n"
CLEAN_FILES=( data/bashstyle data/bashstyle-ng.pc ui/bashstyle.ui.h
data/bashstyle.sh rc/nx-rc i18n/??/*.mo i18n/*.pot
.configure/results .make/build_done ui/#bashstyle.ui#
ui/bashstyle.ui~ )
CL_NUM=${#CLEAN_FILES[@]}
local CUR_NUM=1
for file in ${CLEAN_FILES[@]}; do
echo -e "\t${WHITE} * ${SILVER}[${CUR_NUM}/${CL_NUM}]${CYAN} ${file}"
local CUR_NUM=$((${CUR_NUM}+1))
rm -f "${file}"
done
echo
tput sgr0
}
......@@ -40,3 +40,8 @@ REMOVE_FILES=( ${LOCALE_REMOVE[@]}
${PCDIR}/bashstyle-ng.pc
${PROFILEDIR}/bashstyle.sh
${DATADIR} )
CLEAN_FILES=( data/bashstyle data/bashstyle-ng.pc ui/bashstyle.ui.h
data/bashstyle.sh rc/nx-rc i18n/??/*.mo i18n/*.pot
.configure/results .make/build_done ui/#bashstyle.ui#
ui/bashstyle.ui~ )
......@@ -12,14 +12,15 @@
post_install () {
if [[ ! ${DISABLE_POSTINSTALL} ]]; then
echo -e "\t${WHITE}+ ${MAGENTA} post-installation tasks"
post_install_message
gtk-update-icon-cache -f ${DATADIR}/icons/hicolor 2>/dev/null
if [[ $(grep "bashstyle.sh" ${BASHFILE}) == "" ]]; then
echo -e "\nsource ${PROFILEDIR}/bashstyle.sh" | sed -e 's,//,/,g' >> ${BASHFILE}
fi
fi
echo -e "\n${CYAN}Thanks for using ${APP_NAME}!\n"
thanks_message
}
......@@ -34,7 +35,7 @@ post_remove () {
installdirs_create ()
{
echo -e "\t${WHITE}+ ${MAGENTA} directories"
echo -e "\t${WHITE}+${MAGENTA} directories"
mkdir -p ${DESTDIR}/${DATADIR}
for directory in ${DATADIR_LIST[@]}; do
mkdir -p ${DESTDIR}/${DATADIR}/${directory}
......@@ -55,7 +56,7 @@ installdirs_create ()
inst ()
{
case $1 in
case ${1} in
data ) MODE=644 ;;
bin ) MODE=755 ;;
esac
......@@ -64,49 +65,31 @@ inst ()
FILE=${1/:*}
DEST=${1/*:}
echo -e "\t${WHITE} * ${SMOOTHBLUE}[${2}/${3}]${WHITE} ${FILE}"
install -m${MODE} ${FILE} ${DESTDIR}${DEST}
unset FILE DEST
}
install_bsng () {
DATA_NUM=0
for num in ${#DATA_FILES[@]} ${#LOCALE_FILES[@]} \
${#PC_FILES[@]} ${#ICON_FILES[@]} ${#PROFILE_FILES[@]}; do
DATA_NUM=$((${DATA_NUM}+${num}))
done
local CUR_NUM=1
echo -e "\t${WHITE}+ ${MAGENTA} data files"
echo -e "\t${WHITE}+${YELLOW} data files"
for file in ${DATA_FILES[@]} ${LOCALE_FILES[@]} \
${PC_FILES[@]} ${ICON_FILES[@]} ${PROFILE_FILES[@]}; do
inst data ${file} ${CUR_NUM} ${DATA_NUM}
local CUR_NUM=$((${CUR_NUM}+1))
done
BIN_NUM=0
for num in ${#BIN_FILES[@]}; do
BIN_NUM=$((${BIN_NUM}+${num}))
inst data ${file}
done
local CUR_NUM=1
echo -e "\t${WHITE}+ ${MAGENTA} executable files"
echo -e "\t${WHITE}+${GREEN} executable files"
for file in ${BIN_FILES[@]}; do
inst bin ${file} ${CUR_NUM} ${BIN_NUM}
local CUR_NUM=$((${CUR_NUM}+1))
inst bin ${file}
done
}
remove_bsng () {
echo -e "\t${WHITE}+ ${WHITE} all files"
echo -e "\t${WHITE}+${RED} all files"
for file in ${REMOVE_FILES[@]}; do
rm -rf ${file}
done
post_remove
}
......@@ -42,9 +42,21 @@ build_message () {
}
install_message () {
echo -e "\n${GREEN}Installing ${APP_NAME}${YELLOW} v${APP_VERSION} ${CYAN}${CODENAME}\n"
echo -e "\n${GREEN}Installing ${BLUE}${APP_NAME}${YELLOW} v${APP_VERSION} ${CYAN}${CODENAME}\n"
}
remove_message () {
echo -e "\n${Red}Removing ${APP_NAME}${YELLOW} v${APP_VERSION} ${CYAN}${CODENAME}\n"
echo -e "\n${Red}Removing ${BLUE}${APP_NAME}${YELLOW} v${APP_VERSION} ${CYAN}${CODENAME}\n"
}
clean_message () {
echo -e "\n${Red}Cleaning Up ${BLUE}${APP_NAME}${YELLOW} v${APP_VERSION} ${CYAN}${CODENAME}\n"
}
post_install_message () {
echo -e "\t${WHITE}+${BLUE} post-installation tasks"
}
thanks_message () {
echo -e "\n${CYAN}Thanks for using ${APP_NAME}!\n"
}
......@@ -191,6 +191,15 @@ Overview of changes in v9.1 "Dial T for TNT"
- block devices
- character devices
=== Make 1.0.4 ===
- less verbose upon 'install'
- less verbose upon 'clean'
- tweaked output colors
- fixed message output for 'check_root_message'
- moved some messages from function into messages module
- minor tweaks
=== Translations ===
* updated German translation
......
......@@ -10,8 +10,8 @@
#########################################################
CF_MODULES=( base color )
MK_MODULES=( build clean install messages checks actions )
MK_VERSION=1.0.3
MK_MODULES=( build install messages checks actions )
MK_VERSION=1.0.4
for mod in ${CF_MODULES[@]}; do
source .configure/${mod}
......@@ -28,7 +28,7 @@ if [[ ${pcount} -eq 0 ]]; then
else
while [[ ${xcount} -lt ${pcount} ]]; do
case ${1} in
clean ) clean ;;
clean ) make_clean ;;
pot ) generate_pot ;;
po ) update_po ;;
build ) make_build ;;
......
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