diff options
author | Sainnhe Park | 2021-04-05 16:22:19 +0800 |
---|---|---|
committer | Sainnhe Park | 2021-04-05 16:22:19 +0800 |
commit | 1223aa7ae39e537917aab10083c533c49d7ea8ee (patch) | |
tree | 88aaf9442b753393d30c53fab77b4bffa77b9d8c | |
parent | dffa6fc887503d8ba4b448b119633547fd0835a4 (diff) | |
download | aur-1223aa7ae39e537917aab10083c533c49d7ea8ee.tar.gz |
fix sed command
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rwxr-xr-x | patch.sh | 26 |
3 files changed, 16 insertions, 14 deletions
@@ -11,7 +11,7 @@ pkgbase = code-marketplace source = code-marketplace.hook source = patch.sh md5sums = b7442876feb4ba8b1ffb193b01fd4ff8 - md5sums = d9cd7ce72d6fd9699d1a19029f29084a + md5sums = e0c1391f5bceda0e23bf1219b8d4e6d3 pkgname = code-marketplace @@ -11,7 +11,7 @@ install="${pkgname}.install" source=('code-marketplace.hook' 'patch.sh') md5sums=('b7442876feb4ba8b1ffb193b01fd4ff8' - 'd9cd7ce72d6fd9699d1a19029f29084a') + 'e0c1391f5bceda0e23bf1219b8d4e6d3') package() { install -Dm 644 "${srcdir}"/code-marketplace.hook "${pkgdir}"/usr/share/libalpm/hooks/code-marketplace.hook @@ -1,17 +1,19 @@ #!/usr/bin/env sh if [ "${1}" = "-R" ]; then - sed -i 's/^[[:blank:]]*"serviceUrl":.*/\t\t"serviceUrl": "https:\/\/open-vsx.org\/vscode\/gallery",/' /usr/lib/code/product.json - sed -i '/^[[:blank:]]*"cacheUrl/d' /usr/lib/code/product.json - sed -i 's/^[[:blank:]]*"itemUrl":.*/\t\t"itemUrl": "https:\/\/open-vsx.org\/vscode\/item"/' /usr/lib/code/product.json - sed -i '/^[[:blank:]]*"documentationUrl/i\\t"linkProtectionTrustedDomains": ["https://open-vsx.org"],' /usr/lib/code/product.json - sed -i 's/^[[:blank:]]*"nameLong":.*/\t"nameLong": "Code - OSS",/' /usr/lib/code/product.json - sed -i 's/^[[:blank:]]*"extensionAllowedProposedApi":.*/\t"extensionAllowedProposedApi": ["ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.github-browser", "ms-vscode.github-richnav"],/' /usr/lib/code/product.json + sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/\t\t"serviceUrl": "https:\/\/open-vsx.org\/vscode\/gallery",/' \ + -e '/^[[:blank:]]*"cacheUrl/d' \ + -e 's/^[[:blank:]]*"itemUrl":.*/\t\t"itemUrl": "https:\/\/open-vsx.org\/vscode\/item"/' \ + -e '/^[[:blank:]]*"documentationUrl/i\\t"linkProtectionTrustedDomains": ["https://open-vsx.org"],' \ + -e 's/^[[:blank:]]*"nameLong":.*/\t"nameLong": "Code - OSS",/' \ + -e 's/^[[:blank:]]*"extensionAllowedProposedApi":.*/\t"extensionAllowedProposedApi": ["ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.github-browser", "ms-vscode.github-richnav"],/' \ + /usr/lib/code/product.json else - sed -i 's/^[[:blank:]]*"serviceUrl":.*/\t\t"serviceUrl": "https:\/\/marketplace.visualstudio.com\/_apis\/public\/gallery",/' /usr/lib/code/product.json - sed -i '/^[[:blank:]]*"serviceUrl/a\\t\t"cacheUrl": "https:\/\/vscode.blob.core.windows.net\/gallery\/index",' /usr/lib/code/product.json - sed -i 's/^[[:blank:]]*"itemUrl":.*/\t\t"itemUrl": "https:\/\/marketplace.visualstudio.com\/items"/' /usr/lib/code/product.json - sed -i '/^[[:blank:]]*"linkProtectionTrustedDomains/d' /usr/lib/code/product.json - sed -i 's/^[[:blank:]]*"nameLong":.*/\t"nameLong": "Visual Studio Code",/' /usr/lib/code/product.json - sed -i 's/^[[:blank:]]*"extensionAllowedProposedApi":.*/\t"extensionAllowedProposedApi": ["GitHub.codespaces", "GitHub.vscode-pull-request-github-insiders", "GitHub.vscode-pull-request-github", "Microsoft.vscode-nmake-tools", "ms-ai-tools.notebook-renderers", "ms-dotnettools.dotnet-interactive-vscode", "ms-python.gather", "ms-python.python", "ms-toolsai.jupyter", "ms-toolsai.vscode-ai", "ms-toolsai.vscode-ai-remote", "ms-vscode-remote.remote-containers-nightly", "ms-vscode-remote.remote-containers", "ms-vscode-remote.remote-ssh-edit-nightly", "ms-vscode-remote.remote-ssh-edit", "ms-vscode-remote.remote-ssh-nightly", "ms-vscode-remote.remote-ssh", "ms-vscode-remote.remote-wsl-nightly", "ms-vscode-remote.remote-wsl", "ms-vscode-remote.remote-wsl-recommender", "ms-vscode-remote.vscode-remote-extensionpack-nightly", "ms-vscode-remote.vscode-remote-extensionpack", "ms-vscode.azure-account", "ms-vscode.azure-sphere-tools-ui", "ms-vscode.azure-sphere-tools", "ms-vscode.github-browser", "ms-vscode.github-richnav", "ms-vscode.js-debug-nightly", "ms-vscode.js-debug", "ms-vscode.lsif-browser", "ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.vscode-selfhost-test-provider", "ms-vsliveshare.cloudenv-explorer", "ms-vsliveshare.cloudenv", "ms-vsliveshare.vsliveshare", "ms-vsonline.vsonline", "dbaeumer.vscode-eslint"],/' /usr/lib/code/product.json + sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/\t\t"serviceUrl": "https:\/\/marketplace.visualstudio.com\/_apis\/public\/gallery",/' \ + -e '/^[[:blank:]]*"serviceUrl/a\\t\t"cacheUrl": "https:\/\/vscode.blob.core.windows.net\/gallery\/index",' \ + -e 's/^[[:blank:]]*"itemUrl":.*/\t\t"itemUrl": "https:\/\/marketplace.visualstudio.com\/items"/' \ + -e '/^[[:blank:]]*"linkProtectionTrustedDomains/d' \ + -e 's/^[[:blank:]]*"nameLong":.*/\t"nameLong": "Visual Studio Code",/' \ + -e 's/^[[:blank:]]*"extensionAllowedProposedApi":.*/\t"extensionAllowedProposedApi": ["GitHub.codespaces", "GitHub.vscode-pull-request-github-insiders", "GitHub.vscode-pull-request-github", "Microsoft.vscode-nmake-tools", "ms-ai-tools.notebook-renderers", "ms-dotnettools.dotnet-interactive-vscode", "ms-python.gather", "ms-python.python", "ms-toolsai.jupyter", "ms-toolsai.vscode-ai", "ms-toolsai.vscode-ai-remote", "ms-vscode-remote.remote-containers-nightly", "ms-vscode-remote.remote-containers", "ms-vscode-remote.remote-ssh-edit-nightly", "ms-vscode-remote.remote-ssh-edit", "ms-vscode-remote.remote-ssh-nightly", "ms-vscode-remote.remote-ssh", "ms-vscode-remote.remote-wsl-nightly", "ms-vscode-remote.remote-wsl", "ms-vscode-remote.remote-wsl-recommender", "ms-vscode-remote.vscode-remote-extensionpack-nightly", "ms-vscode-remote.vscode-remote-extensionpack", "ms-vscode.azure-account", "ms-vscode.azure-sphere-tools-ui", "ms-vscode.azure-sphere-tools", "ms-vscode.github-browser", "ms-vscode.github-richnav", "ms-vscode.js-debug-nightly", "ms-vscode.js-debug", "ms-vscode.lsif-browser", "ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.vscode-selfhost-test-provider", "ms-vsliveshare.cloudenv-explorer", "ms-vsliveshare.cloudenv", "ms-vsliveshare.vsliveshare", "ms-vsonline.vsonline", "dbaeumer.vscode-eslint"],/' \ + /usr/lib/code/product.json fi |