mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-20 04:26:25 +00:00
feat: add dashcore (dash-cli, dashd, dash-qt)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dash-cli (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash-cli` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "'dash-cli@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash-cli@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dash-qt (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash-qt` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "'dash-qt@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash-qt@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dash-wallet (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash-wallet` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "'dash-wallet@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash-wallet@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: Dash (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dash` (digital cash) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "'dash@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dash@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Dash Core
|
||||
homepage: https://github.com/dashpay/dash
|
||||
tagline: |
|
||||
foobar: An example that doesn't exist.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi dashcore@stable` (or `@v0.17`, `@beta`,
|
||||
etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```txt
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/bin/
|
||||
~/.local/opt/dashcore/
|
||||
~/Library/Saved Application State/org.dash.Dash-Qt.savedState
|
||||
~/Library//Preferences/org.dash.Dash-Qt.plist
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> _Dash Core_ is a suite of tools for _Dash_, the international digital
|
||||
> currency.
|
||||
|
||||
The tools include:
|
||||
|
||||
- `dash-qt` the _Desktop Wallet_ for sending and receiving payments
|
||||
- `dash-cli` the _Command Line Wallet_
|
||||
- [`dashd`](/dashd) the ledger and transaction service
|
||||
- `dash-tx` the transaction debugger
|
||||
|
||||
To open the Dash Desktop Wallet:
|
||||
|
||||
```bash
|
||||
dash-qt
|
||||
```
|
||||
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
##################
|
||||
# Install dashcore #
|
||||
##################
|
||||
|
||||
# Every package should define these variables
|
||||
$pkg_cmd_name = "dashd"
|
||||
|
||||
$pkg_dst_cmd = "$Env:USERPROFILE\.local\opt\dashcore\bin\dashd.exe"
|
||||
$pkg_dst_dir = "$Env:USERPROFILE\.local\opt\dashcore"
|
||||
$pkg_dst = "$pkg_dst_cmd"
|
||||
|
||||
$pkg_src_cmd = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION\bin\dashd.exe"
|
||||
$pkg_src_bin = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION\bin"
|
||||
$pkg_src_dir = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION"
|
||||
$pkg_src = "$pkg_src_cmd"
|
||||
|
||||
New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null
|
||||
$pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
|
||||
# Fetch archive
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"))
|
||||
{
|
||||
echo "Downloading dashcore from $Env:WEBI_PKG_URL to $pkg_download"
|
||||
& curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& move "$pkg_download.part" "$pkg_download"
|
||||
}
|
||||
|
||||
IF (!(Test-Path -Path "$pkg_src_dir"))
|
||||
{
|
||||
echo "Installing dashcore"
|
||||
|
||||
# TODO: create package-specific temp directory
|
||||
# Enter tmp
|
||||
pushd .local\tmp
|
||||
|
||||
# Remove any leftover tmp cruft
|
||||
Remove-Item -Path ".\dashcore*" -Recurse -ErrorAction Ignore
|
||||
|
||||
# Unpack archive file into this temporary directory
|
||||
# Windows BSD-tar handles zip. Imagine that.
|
||||
echo "Unpacking $pkg_download"
|
||||
& tar xf "$pkg_download"
|
||||
|
||||
# Settle unpacked archive into place
|
||||
echo "Install Location: $pkg_src_cmd"
|
||||
Move-Item -Path ".\dashcore*" -Destination "$pkg_src_dir"
|
||||
|
||||
# Exit tmp
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'"
|
||||
Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null
|
||||
Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
# "'pkg_cmd_name' appears unused. Verify it or export it."
|
||||
|
||||
function __init_dashcore() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
##################
|
||||
# Install dashcore #
|
||||
##################
|
||||
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="dashd"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/opt/dashcore/bin/dashd"
|
||||
pkg_dst_dir="$HOME/.local/opt/dashcore"
|
||||
pkg_dst="$pkg_dst_dir"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/dashcore-v$WEBI_VERSION/bin/dashd"
|
||||
pkg_src_dir="$HOME/.local/opt/dashcore-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_dir"
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
# mv ./dashcore-* ~/.local/opt/dashcore-v0.17.0
|
||||
mv ./dashcore-* "${pkg_src_dir}"
|
||||
}
|
||||
|
||||
# pkg_get_current_version is recommended, but not required
|
||||
pkg_get_current_version() {
|
||||
# 'dashd --version' has output in this format:
|
||||
# Dash Core Daemon version v0.17.0.3
|
||||
# This trims it down to just the version number:
|
||||
# 0.17.0
|
||||
dashd --version 2> /dev/null |
|
||||
head -n 1 |
|
||||
cut -d ' ' -f 5 |
|
||||
sed 's:^v::'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
__init_dashcore
|
||||
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
var github = require('../_common/github.js');
|
||||
var owner = 'dashpay';
|
||||
var repo = 'dash';
|
||||
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
all.releases = all.releases.filter(function (rel) {
|
||||
return !rel.name.endsWith('.asc');
|
||||
});
|
||||
all.releases.forEach(function (rel) {
|
||||
if (rel.name.includes('osx64')) {
|
||||
rel.os = 'macos';
|
||||
}
|
||||
});
|
||||
return all;
|
||||
});
|
||||
};
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
// just select the first 5 for demonstration
|
||||
all.releases = all.releases.slice(0, 5);
|
||||
console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: dashd (alias)
|
||||
homepage: https://webinstall.dev/dashcore
|
||||
tagline: |
|
||||
`dashd` (dash daemon) is an alias for `dashcore` (the dash suite)
|
||||
alias: dashcore
|
||||
---
|
||||
|
||||
See [Dash Core](/dashcore).
|
||||
@@ -0,0 +1,3 @@
|
||||
echo "'dashd@$Env:WEBI_TAG' is an alias for 'dashcore@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/dashcore@$Env:WEBI_VERSION" | powershell
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -u
|
||||
|
||||
function __redirect_alias_dashcore() {
|
||||
echo "'dashd@${WEBI_TAG:-}' (project) is an alias for 'dashcore@${WEBI_VERSION:-}' (command)"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/dashcore@${WEBI_VERSION:-}" | bash
|
||||
}
|
||||
|
||||
__redirect_alias_dashcore
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../dashcore/releases.js');
|
||||
Reference in New Issue
Block a user