Make native update script user configurable, give feedback

This commit is contained in:
Oliver Blanthorn 2018-04-25 12:44:16 +01:00
parent 4dd22e7aca
commit 26475f5565
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 5 additions and 2 deletions

View file

@ -240,6 +240,8 @@ const DEFAULTS = o({
// This has to be a command that stays in the foreground for the whole editing session
editorcmd: "gvim -f",
browser: "firefox",
nativeinstallcmd:
"curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash",
})
/** Given an object and a target, extract the target if it exists, else return undefined

View file

@ -222,7 +222,7 @@ export async function native() {
*/
//#background
export async function installnative() {
const installstr = "curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash"
const installstr = await config.get("nativeinstallcmd")
await clipboard("yank", installstr)
fillcmdline("# Installation command copied to clipboard. Please paste and run it in your shell to install the native messenger.")
}
@ -230,7 +230,8 @@ export async function installnative() {
//#background
export async function updatenative() {
if (await nativegate()) {
Native.run("curl -fsSl https://raw.githubusercontent.com/cmcaine/tridactyl/master/native/install.sh | bash")
await Native.run(await config.get("nativeinstallcmd"))
native()
}
}