File: hello_i18n

package info (click to toggle)
bash-unit 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,304 kB
  • sloc: sh: 1,134; makefile: 10
file content (22 lines) | stat: -rwxr-xr-x 300 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

main() {
  hello "$1"
}

hello() {
  case "$1" in
    fr) echo Bonjour le monde
      ;;
    *) echo we only speak french for the moment, sorry >&2
      ;;
  esac
}

# do not run main when sourcing the script
if [[ "$0" == "${BASH_SOURCE[0]}" ]]
then
  main "$@"
else
  true
fi