mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-24 05:31:11 -05:00
Make snap helper script POSIX compliant
This commit is contained in:
parent
9b63e6a289
commit
138378626f
@ -20,29 +20,30 @@ set -e
|
|||||||
|
|
||||||
DEBUG=false
|
DEBUG=false
|
||||||
|
|
||||||
JSON_BASE=$(cat << EOF
|
JSON_FIREFOX=$(cat << EOF
|
||||||
{
|
{
|
||||||
"name": "org.keepassxc.keepassxc_browser",
|
"name": "org.keepassxc.keepassxc_browser",
|
||||||
"description": "KeePassXC integration with native messaging support",
|
"description": "KeePassXC integration with native messaging support",
|
||||||
"path": "/snap/bin/keepassxc.proxy",
|
"path": "/snap/bin/keepassxc.proxy",
|
||||||
"type": "stdio",
|
"type": "stdio",
|
||||||
__EXT__
|
"allowed_extensions": [
|
||||||
|
"keepassxc-browser@keepassxc.org"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
JSON_FIREFOX=$(cat << EOF
|
|
||||||
"allowed_extensions": [
|
|
||||||
"keepassxc-browser@keepassxc.org"
|
|
||||||
]
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
JSON_CHROME=$(cat << EOF
|
JSON_CHROME=$(cat << EOF
|
||||||
"allowed_origins": [
|
{
|
||||||
|
"name": "org.keepassxc.keepassxc_browser",
|
||||||
|
"description": "KeePassXC integration with native messaging support",
|
||||||
|
"path": "/snap/bin/keepassxc.proxy",
|
||||||
|
"type": "stdio",
|
||||||
|
"allowed_origins": [
|
||||||
"chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/",
|
"chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/",
|
||||||
"chrome-extension://oboonakemofpalcgghocfoadofidjkkk/"
|
"chrome-extension://oboonakemofpalcgghocfoadofidjkkk/"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -52,12 +53,12 @@ INSTALL_DIR=""
|
|||||||
INSTALL_FILE="org.keepassxc.keepassxc_browser.json"
|
INSTALL_FILE="org.keepassxc.keepassxc_browser.json"
|
||||||
|
|
||||||
buildJson() {
|
buildJson() {
|
||||||
if [[ ! -z $1 ]]; then
|
if [ -n "$1" ]; then
|
||||||
# Insert Firefox data
|
# Insert Firefox data
|
||||||
JSON_OUT="${JSON_BASE/__EXT__/$JSON_FIREFOX}"
|
JSON_OUT=$JSON_FIREFOX
|
||||||
else
|
else
|
||||||
# Insert Chrome data
|
# Insert Chrome data
|
||||||
JSON_OUT="${JSON_BASE/__EXT__/$JSON_CHROME}"
|
JSON_OUT=$JSON_CHROME
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user