1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p jq
13 if [[ "$OS" == "linux" ]]; then
14 if [[ "$ARCH" == "x86_64" ]]; then
19 URL
="https://downloads.1password.com/${OS}/tar/${CHANNEL}/${ARCH}/1password-${VERSION}.${EXT}"
22 URL
="https://downloads.1password.com/${OS}/1Password-${VERSION}-${EXT}"
25 CURRENT_HASH
=$
(nix store prefetch-file
"$URL" --json | jq
-r '.hash')
27 echo "$CHANNEL ${ARCH}-${OS}: $CURRENT_HASH"
30 if [[ -z "$STABLE_VER" && -n "$1" ]]; then
34 if [[ -z "$BETA_VER" && -n "$2" ]]; then
38 if [[ "${BETA_VER: -4}" != "BETA" ]]; then
39 BETA_VER
="$BETA_VER.BETA"
42 if [[ -z "$STABLE_VER" ]]; then
43 echo "No 'STABLE_VER' environment variable provided, skipping"
45 print_hash
"linux" "stable" "x86_64" "$STABLE_VER"
46 print_hash
"linux" "stable" "aarch64" "$STABLE_VER"
47 print_hash
"mac" "stable" "x86_64" "$STABLE_VER"
48 print_hash
"mac" "stable" "aarch64" "$STABLE_VER"
51 if [[ -z "$BETA_VER" ]]; then
52 echo "No 'BETA_VER' environment variable provided, skipping"
54 print_hash
"linux" "beta" "x86_64" "$BETA_VER"
55 print_hash
"linux" "beta" "aarch64" "$BETA_VER"
56 print_hash
"mac" "beta" "x86_64" "$BETA_VER"
57 print_hash
"mac" "beta" "aarch64" "$BETA_VER"