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