From 1711a5c07c5d35d21f422e59f10c7836953a256e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 23 Sep 2013 19:59:53 -0400 Subject: fullpkg: internationalize --- src/fullpkg/fullpkg-build | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'src/fullpkg/fullpkg-build') diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build index 106ff0e..8f01369 100755 --- a/src/fullpkg/fullpkg-build +++ b/src/fullpkg/fullpkg-build @@ -124,38 +124,34 @@ trap 'trap_exit "(fullpkg-build) An unknown error has occurred. Exiting..."' ERR CLEANUP="false" CHECKNONFREE="true" RUN="$FULLBUILDCMD" -MESSAGE="Building packages" +MESSAGE="$(_ 'Building packages')" usage() { - - echo "" - echo "$(basename $0) [options] " - echo "" - echo "Builds packages from build_dir, create a build_dir using:" - echo "'fullpkg-find '" - echo "" - echo "If no is specified, it uses the current directory." - echo "" - echo "OPTIONS:" - echo " -h : this message." - echo " -c : clean on succesfull build" - echo " -N : don't check for freedom issues." #Also made by fullpkg-find - echo " -r \"command\" : use this instead of \"$FULLBUILDCMD\"." - echo " -g : get sources for building packages on build_dir." - echo "" - exit 1 - + print "Usage: %s [OPTIONS] [BUILD_DIR]" "${0##*/}" + print "Builds packages in BUILD_DIR, as set up by fullpkg-find" + echo + prose "Builds packages from BUILD_DIR; create BUILD_DIR using:" + print ' $ fullpkg-find BUILD_DIR' + echo + prose "If no BUILD_DIR is specified, it uses the current directory." + echo + print "Options:" + flag "-c" "Clean BUILD_DIR on succesfull build" + flag "-N" "Don't check for freedom issues." #Also made by fullpkg-find + flag "-r $(_ CMD)" "Use CMD instead of \${FULLBUILDCMD}" + flag "-g" "Get sources for building packages on BUILD_DIR" + flag "-h" "Show this message" } while getopts 'hNr:g' arg; do case $arg in - h) usage ;; + h) usage; exit 0 ;; c) CLEAN ;; N) CHECKNONFREE="false" ;; r) RUN="$OPTARG" - MESSAGE="Executing custom action";; + MESSAGE="$(_ 'Executing custom action')";; g) RUN='makepkg -g > /dev/null' - MESSAGE="Downloading packages";; + MESSAGE="$(_ 'Downloading packages')";; esac done @@ -166,6 +162,7 @@ buildorder="${build_dir}/BUILDORDER" if [ ! -e "$buildorder" ]; then error "This is not a build_dir. Make one using fullpkg." usage + exit 1 else # backup BUILDORDER cp "$buildorder" "$build_dir/.BUILDORDER" -- cgit v1.2.3-2-g168b