this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Ignore repo.git and update encrypted files

+74 -3
+1
.config/yadm/.gitignore
··· 1 + repo.git
+5 -3
.config/yadm/bootstrap
··· 51 51 setup_linux 52 52 fi 53 53 54 - GPG_TTY=$(tty) 55 - export GPG_TTY 56 - yadm decrypt 54 + if confirm "Decrypt encrypted files?"; then 55 + GPG_TTY=$(tty) 56 + export GPG_TTY 57 + yadm decrypt 58 + fi 57 59 } 58 60 59 61 main "$@"
.config/yadm/files.gpg

This is a binary file and will not be displayed.

+68
.config/yadm/utils.sh
··· 1 + #!/bin/bash 2 + # Helper utilities for `yadm bootstrap` and hooks 3 + 4 + VSCODE_EXTENSIONS=~/.config/vscode/extensions.txt 5 + 6 + function confirm() { 7 + read -r -n 1 -p "$1 [Y/n]: " 8 + 9 + # Default to yes for empty input 10 + if [[ "$REPLY" == "" ]]; then 11 + return 0 12 + else 13 + echo 14 + fi 15 + 16 + # Only 'y' input is valid if something was typed 17 + if [[ "$REPLY" =~ ^[Yy]$ ]]; then 18 + return 0 19 + fi 20 + 21 + echo "Operation skipped." 22 + } 23 + 24 + function list_vscode_exts() { 25 + code --list-extensions --show-versions 26 + } 27 + 28 + function check_vscode_exts() { 29 + diff "$VSCODE_EXTENSIONS" \ 30 + <(list_vscode_exts) \ 31 + --unchanged-line-format="" \ 32 + "$@" 33 + } 34 + 35 + function install_vscode_exts() { 36 + xargs printf -- "--install-extension %s " <"$VSCODE_EXTENSIONS" | xargs code 37 + echo 38 + 39 + # TODO: some kind of vscode extension "prune" command. Or just uninstall all every time? 40 + if ! check_vscode_exts &>/dev/null; then 41 + # This check may not be needed since `code` errors if it can't install 42 + local UNINSTALLED 43 + UNINSTALLED=$(check_vscode_exts \ 44 + --old-line-format=" %L" \ 45 + --new-line-format="" \ 46 + || : 47 + ) 48 + 49 + if [[ -n $UNINSTALLED ]]; then 50 + echo "ERROR: some VSCode extensions were not installed:" 51 + echo "$UNINSTALLED" 52 + echo 53 + return 1 54 + fi 55 + 56 + local INSTALLED 57 + INSTALLED=$(check_vscode_exts \ 58 + --old-line-format="" \ 59 + --new-line-format=" %L" \ 60 + || : 61 + ) 62 + if [[ -n $INSTALLED ]]; then 63 + echo "WARNING: some installed VSCode extensions were not found in $VSCODE_EXTENSIONS:" 64 + echo "$INSTALLED" 65 + echo 66 + fi 67 + fi 68 + }