summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelrelb2020-08-28 22:43:01 +0300
committerrelrelb2020-08-28 22:43:49 +0300
commit84b03ddd39dc93ea90750dd74738a89eb69f751a (patch)
tree6d00716d6a3aaf5e416e7696c868fb9493357c6f
parent11d99f96806dee8388e92bb504d85de8ca255bd1 (diff)
downloadaur-84b03ddd39dc93ea90750dd74738a89eb69f751a.tar.gz
Improvements
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD21
-rw-r--r--android-completion.patch40
4 files changed, 12 insertions, 59 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c941e4688f..2821afed733 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = android-completion
pkgdesc = Bash completion for adb and fastboot
- pkgver = 20200821.cdfef7f
+ pkgver = 20200828.86f1921
pkgrel = 1
url = https://android.googlesource.com/platform/system/core/
arch = any
@@ -9,12 +9,10 @@ pkgbase = android-completion
depends = bash
depends = bash-completion
conflicts = android-bash-completion
- source = adb.bash.b64::https://android.googlesource.com/platform/system/core/+/cdfef7f/adb/adb.bash?format=TEXT
- source = fastboot.bash.b64::https://android.googlesource.com/platform/system/core/+/cdfef7f/fastboot/fastboot.bash?format=TEXT
- source = android-completion.patch
+ source = adb.bash.b64::https://android.googlesource.com/platform/system/core/+/86f1921/adb/adb.bash?format=TEXT
+ source = fastboot.bash.b64::https://android.googlesource.com/platform/system/core/+/86f1921/fastboot/fastboot.bash?format=TEXT
sha512sums = 450cdf58661537b0d1fcdf191a6b635ac87eb3cfeb3187106409bb92f71ae0b73df27a0fa2c7b1a2e16552ed04e6b0660e88e737058abf6b97051558564d85fb
sha512sums = 7a386704e5cb02ffcc921e3f6db81401ec292dcd18374bae9cdd68d086baf52905cc2db75c3f661eb06fdc1a8401f2cc40b7ba9dd249be4e235052a003ca90b5
- sha512sums = da0cfc049bfcb1cf1c3baf274079f146efb2abc30863c585a8f4221aca5292c9de2a7e57efe808dfbf3ef2aa3c340b19bba01f23ce77ed4ef62bb9b9afe4ef5a
pkgname = android-completion
diff --git a/.gitignore b/.gitignore
index d9a18e0639c..e1069dfe284 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,5 +3,3 @@
!PKGBUILD
!.SRCINFO
-
-!*.patch
diff --git a/PKGBUILD b/PKGBUILD
index a7d7124701e..160967ac285 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,18 @@
# Maintainer: relrel <relrelbachar@gmail.com>
-
pkgname=android-completion
-pkgver=20200821.cdfef7f
+pkgver=20200828.86f1921
pkgrel=1
pkgdesc="Bash completion for adb and fastboot"
-arch=(any)
+arch=('any')
url="https://android.googlesource.com/platform/system/core/"
license=('Apache')
-depends=('android-sdk-platform-tools' 'bash' 'bash-completion')
-conflicts=('android-bash-completion')
-_commit=$(echo $pkgver | cut -d. -f2)
+depends=(android-sdk-platform-tools bash bash-completion)
+conflicts=(android-bash-completion)
+_commit=${pkgver#*.}
source=("adb.bash.b64::https://android.googlesource.com/platform/system/core/+/$_commit/adb/adb.bash?format=TEXT"
- "fastboot.bash.b64::https://android.googlesource.com/platform/system/core/+/$_commit/fastboot/fastboot.bash?format=TEXT"
- "$pkgname.patch")
+ "fastboot.bash.b64::https://android.googlesource.com/platform/system/core/+/$_commit/fastboot/fastboot.bash?format=TEXT")
sha512sums=('450cdf58661537b0d1fcdf191a6b635ac87eb3cfeb3187106409bb92f71ae0b73df27a0fa2c7b1a2e16552ed04e6b0660e88e737058abf6b97051558564d85fb'
- '7a386704e5cb02ffcc921e3f6db81401ec292dcd18374bae9cdd68d086baf52905cc2db75c3f661eb06fdc1a8401f2cc40b7ba9dd249be4e235052a003ca90b5'
- 'da0cfc049bfcb1cf1c3baf274079f146efb2abc30863c585a8f4221aca5292c9de2a7e57efe808dfbf3ef2aa3c340b19bba01f23ce77ed4ef62bb9b9afe4ef5a')
+ '7a386704e5cb02ffcc921e3f6db81401ec292dcd18374bae9cdd68d086baf52905cc2db75c3f661eb06fdc1a8401f2cc40b7ba9dd249be4e235052a003ca90b5')
pkgver() {
head=$(curl -sSf 'https://android.googlesource.com/platform/system/core/+/HEAD?format=JSON' | sed 's/$/\\n/' | tr -d '\n')
@@ -26,15 +23,15 @@ pkgver() {
time=$(echo $timestamp | cut -d' ' -f4)
year=$(echo $timestamp | cut -d' ' -f5)
timezone=$(echo $timestamp | cut -d' ' -f6)
- printf "%s.%s" $(date -d "${day} ${month} ${year} ${time} ${timezone}" +%Y%m%d) ${commit:0:7}
+ printf "%s.%s" $(date -d "$day $month $year $time $timezone" +%Y%m%d) ${commit:0:7}
}
prepare() {
cd "$srcdir"
for i in adb fastboot; do
base64 -d $i.bash.b64 > $i.bash
+ sed -i 's/check_type/type -t/g' $i.bash
done
- patch -p2 -i "$pkgname.patch"
}
package() {
diff --git a/android-completion.patch b/android-completion.patch
deleted file mode 100644
index 54a45f7f3c7..00000000000
--- a/android-completion.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/adb/adb.bash b/adb/adb.bash
-index b1b3957c0..733fc12bd 100644
---- a/adb/adb.bash
-+++ b/adb/adb.bash
-@@ -15,6 +15,15 @@
- # limitations under the License.
- #
-
-+case "$(ps -o command -hp $$)" in
-+ *bash*)
-+ function check_type() { type -t "$1"; }
-+ ;;
-+ *zsh*)
-+ function check_type() { type "$1"; }
-+ ;;
-+esac
-+
- _adb() {
- if ! check_type "$1" >/dev/null; then
- return
-diff --git a/fastboot/fastboot.bash b/fastboot/fastboot.bash
-index 406e8b8d7..bc50e4aa0 100644
---- a/fastboot/fastboot.bash
-+++ b/fastboot/fastboot.bash
-@@ -15,6 +15,15 @@
- # limitations under the License.
- #
-
-+case "$(ps -o command -hp $$)" in
-+ *bash*)
-+ function check_type() { type -t "$1"; }
-+ ;;
-+ *zsh*)
-+ function check_type() { type "$1"; }
-+ ;;
-+esac
-+
- _fastboot() {
- if ! check_type "$1" >/dev/null; then
- return