summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlberto Salvia Novella2019-05-10 05:35:43 +0200
committerAlberto Salvia Novella2019-05-10 05:35:43 +0200
commit89574a4559047f968b9763507cc08de6c459ddc8 (patch)
treec9d94759f18cbf7caa99aefc68745921bb196040
downloadaur-89574a4559047f968b9763507cc08de6c459ddc8.tar.gz
2019-05-10 1557459342
-rw-r--r--.SRCINFO15
-rwxr-xr-xBUILD59
-rwxr-xr-xPKGBUILD27
-rwxr-xr-xPUBLISH54
4 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..03dd45e22d2d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = fairy-wallet
+ pkgdesc = Manages EOS tokens stored in a Ledger Nano S hardware wallet
+ pkgver = 0.10.0
+ pkgrel = 1
+ url = https://github.com/tarassh/fairy-wallet
+ arch = x86_64
+ license = MIT
+ depends = ledger-udev
+ provides = fairy-wallet
+ conflicts = fairy-wallet
+ source = https://github.com/tarassh/fairy-wallet/releases/download/v0.10.0/fairy-wallet_0.10.0_amd64.deb
+ sha256sums = SKIP
+
+pkgname = fairy-wallet
+
diff --git a/BUILD b/BUILD
new file mode 100755
index 000000000000..cab06cc91765
--- /dev/null
+++ b/BUILD
@@ -0,0 +1,59 @@
+#! /bin/bash
+# (GPL3+) Alberto Salvia Novella (es20490446e.wordpress.com)
+
+
+mainFunction () {
+ updateInfoFile
+ buildPackage
+}
+
+
+buildPackage () {
+ removeBuildFiles
+ echoOnError "buildPackage" "makepkg --force"
+ removeBuildFiles
+}
+
+
+changeToThisProgramDir () {
+ cd "$( dirname "${BASH_SOURCE[0]}" )"
+}
+
+
+echoOnError () {
+ function="${1}"
+ command="${2}"
+ error=$(eval "${command}" 2>&1 >"/dev/null")
+
+ if [ ${?} -ne 0 ]; then
+ echo "${function}: ${error}" >&2
+ exit 1
+ fi
+}
+
+
+removeBuildFiles () {
+ name=$(variableInFile "Name" "PKGBUILD")
+ folders="pkg src ${name}"
+ echoOnError "removeBuildFiles" "rm --recursive --force ${folders}"
+}
+
+
+updateInfoFile () {
+ echoOnError "updateInfoFile" "makepkg --printsrcinfo > .SRCINFO"
+}
+
+
+variableInFile () {
+ variable="${1}"
+ file="${2}"
+
+ echo $(
+ source "${file}";
+ eval echo \$\{${variable}\}
+ )
+}
+
+
+changeToThisProgramDir
+mainFunction
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..e7145ffb99db
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+#! /bin/bash
+# (GPL3+) Alberto Salvia Novella (es20490446e.wordpress.com)
+
+Publisher="tarassh"
+pkgname="fairy-wallet"
+pkgver=0.10.0
+pkgrel=1
+pkgdesc="Manages EOS tokens stored in a Ledger Nano S hardware wallet"
+arch=("x86_64")
+url="https://github.com/${Publisher}/${pkgname}"
+license=("MIT")
+depends=("ledger-udev")
+provides=("${pkgname}")
+conflicts=("${pkgname}")
+source=("${url}/releases/download/v${pkgver}/${pkgname}_${pkgver}_amd64.deb")
+sha256sums=("SKIP")
+
+
+package () {
+ tar xf "${srcdir}/data.tar.xz" -C "${pkgdir}"
+}
+
+
+pkgver () {
+ Url="https://api.github.com/repos/${Publisher}/${pkgname}/releases/latest"
+ curl --silent "${Url}" | grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/' | cut --characters="2-"
+}
diff --git a/PUBLISH b/PUBLISH
new file mode 100755
index 000000000000..836b826cd781
--- /dev/null
+++ b/PUBLISH
@@ -0,0 +1,54 @@
+#! /bin/bash
+# (GPL3+) Alberto Salvia Novella (es20490446e.wordpress.com)
+
+
+mainFunction () {
+ summary=$(summary "${1}")
+
+ updateInfoFile
+ publish "${summary}"
+}
+
+
+changeToThisProgramDir () {
+ cd "$( dirname "${BASH_SOURCE[0]}" )"
+}
+
+
+echoOnError () {
+ function="${1}"
+ command="${2}"
+ error=$(eval "${command}" 2>&1 >"/dev/null")
+
+ if [ ${?} -ne 0 ]; then
+ echo "${function}: ${error}" >&2
+ exit 1
+ fi
+}
+
+
+publish () {
+ summary="${1}"
+
+ echoOnError "publish: add" "git add ."
+ git commit --message="${summary}" 2>&1 >"/dev/null"
+ echoOnError "publish: push" "git push"
+}
+
+
+summary () {
+ summary="${1}"
+
+ if [ "${summary}" == "" ]; then
+ echo $(date "+%Y-%m-%d %s")
+ fi
+}
+
+
+updateInfoFile () {
+ echoOnError "updateInfoFile" "makepkg --printsrcinfo > .SRCINFO"
+}
+
+
+changeToThisProgramDir
+mainFunction ${@}