| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | #!/usr/bin/env bashexport VSCODE_QUALITY="stable"while getopts ":i" opt; do  case "$opt" in    i)      export VSCODE_QUALITY="insider"      ;;    *)      ;;  esacdonecd vscode || { echo "'vscode' dir not found"; exit 1; }git add .git reset -q --hard HEADfor FILE in ../patches/*.patch; do  if [[ -f "${FILE}" ]]; then    echo applying patch: "${FILE}"    if ! git apply --ignore-whitespace "${FILE}"; then      echo failed to apply patch "${FILE}"      git apply --reject "${FILE}"      git apply --reject "../patches/helper/settings.patch"      read -rp "Press any key when the conflict have been resolved..." -n1 -s      git restore .vscode/settings.json      git add .      git diff --staged -U1 > "${FILE}"    fi    git add .    git reset -q --hard HEAD  fidoneif [[ "${VSCODE_QUALITY}" == "insider" ]]; then  for FILE in ../patches/insider/*.patch; do    if [[ -f "${FILE}" ]]; then      echo applying patch: "${FILE}"      if ! git apply --ignore-whitespace "${FILE}"; then        echo failed to apply patch "${FILE}"        git apply --reject "${FILE}"        git apply --reject "../patches/helper/settings.patch"        read -rp "Press any key when the conflict have been resolved..." -n1 -s        git restore .vscode/settings.json        git add .        git diff --staged -U1 > "${FILE}"      fi      git add .      git reset -q --hard HEAD    fi  donefi
 |