From 5557f080c9b18bc544b40e5642760d9a9bec3f37 Mon Sep 17 00:00:00 2001 From: "suzanne.soy" Date: Sat, 10 Oct 2020 01:37:07 +0100 Subject: [PATCH] export-chrome-bookmarks.sh: added usage info --- export-chrome-bookmarks.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/export-chrome-bookmarks.sh b/export-chrome-bookmarks.sh index fbae51e..f95b79d 100755 --- a/export-chrome-bookmarks.sh +++ b/export-chrome-bookmarks.sh @@ -1,10 +1,20 @@ #!/usr/bin/env nix-shell -#!nix-shell --pure -i bash -p dejsonlz4 jq bash -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fea633695211167753ee732c9087808d0c57461c.tar.gz - -# Usage: ./export-firefox-bookmarks.sh [path/to/.mozilla/firefox/XXXXXXXX.profile] +#!nix-shell --pure -i bash -p jq bash -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fea633695211167753ee732c9087808d0c57461c.tar.gz set -euET -o pipefail +usage() { + printf "Usage: %q [path/to/.config/chromium/Default/]"\\n "$0" +} + +if test $# -ne 1; then + usage + exit 1 +elif test $# -eq 1 && (test "x$1" = "x-h" || test "x$1" = "x--help"); then + usage + exit 0 +fi + if test $# -ge 1; then profile="$1" else