vscode-extensions.update_installed_exts.sh: add function how to use the output with vscode, make shellcheck work

This commit is contained in:
Sandro Jäckel 2021-11-14 16:55:01 +01:00
parent cf05198542
commit a63f9e1ca1
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,7 +1,23 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq unzip
# shellcheck shell=bash
set -eu -o pipefail
# can be added to your configuration with the following command and snippet:
# $ ./pkgs/misc/vscode-extensions/update_installed_exts.sh > extensions.nix
#
# packages = with pkgs;
# (vscode-with-extensions.override {
# vscodeExtensions = map
# (extension: vscode-utils.buildVscodeMarketplaceExtension {
# mktplcRef = {
# inherit (extension) name publisher version sha256;
# };
# })
# (import ./extensions.nix).extensions;
# })
# ]
# Helper to just fail with a message and non-zero exit code.
function fail() {
echo "$1" >&2