diff --git a/.gitpod.yml b/.gitpod.yml index f04e1c4..990d49d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,4 +12,5 @@ vscode: - bungcip.better-toml@0.3.2:3QfgGxxYtGHfJKQU7H0nEw== - hbenl.vscode-test-explorer@2.15.0:koqDUMWDPJzELp/hdS/lWw== - belfz.search-crates-io@1.2.1:kSLnyrOhXtYPjQpKnMr4eQ== - - serayuzgur.crates@0.4.7:HMkoguLcXp9M3ud7ac3eIw== \ No newline at end of file + - serayuzgur.crates@0.4.7:HMkoguLcXp9M3ud7ac3eIw== + - timonwong.shellcheck@0.9.0:hsU/Rd39aqPYowTqL+DbXg== \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index bda9e1c..0597b92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,4 +17,6 @@ log = "0.4.8" # FIXME: Replace with latest once development is in gold die = "0.2.0" # Used for repository management as alternative to 'make' -cargo-make = "0.26.2" \ No newline at end of file +cargo-make = "0.26.2" +# Used for reading toml files +toml = "0.5.6" \ No newline at end of file diff --git a/po/README.md b/po/README.md new file mode 100644 index 0000000..fe5a68e --- /dev/null +++ b/po/README.md @@ -0,0 +1 @@ +Directory used for translations \ No newline at end of file diff --git a/po/english.toml b/po/english.toml new file mode 100644 index 0000000..f24ebae --- /dev/null +++ b/po/english.toml @@ -0,0 +1,2 @@ +myvar = "test_v" +myvar = "test1_v" \ No newline at end of file diff --git a/src/bin/main.bash b/src/bin/main.bash index 7d610f7..d3297f3 100644 --- a/src/bin/main.bash +++ b/src/bin/main.bash @@ -1,3 +1,13 @@ #!/usr/bin/env bash -printf '%s\n' "ping" \ No newline at end of file +printf '%s\n' "ping" + +# Argument management +while [ $# -ge 1 ]; do case $1 in + --help|-h|help) + fixme "Help message here" + shift 1 + ;; + *) + die 2 "FIXME: Syntax error" +esac; done \ No newline at end of file diff --git a/src/bin/main.sh b/src/bin/main.sh index 297bef3..e7bf7cd 100644 --- a/src/bin/main.sh +++ b/src/bin/main.sh @@ -1,3 +1,23 @@ #!/bin/sh -printf '%s\n' "ping" \ No newline at end of file +printf '%s\n' "ping" + +# Simplified assertion +die() { + printf 'FATAL: %s\n' "$2" + exit "$1" +} + +fixme() { + [ -z "$IGNORE_FIXME" ] && printf 'FIXME: %s\n' "$1" +} + +# Argument management +while [ $# -ge 1 ]; do case $1 in + --help|-h|help) + fixme "Help message here" + shift 1 + ;; + *) + die 2 "FIXME: Syntax error" +esac; done \ No newline at end of file