Don't print version number when sourcing version.sh

This commit is contained in:
Eric Torres 2022-09-28 22:14:24 -07:00
parent 607a7d488b
commit 4248fb1ffe
2 changed files with 13 additions and 15 deletions

View File

@ -5,37 +5,33 @@ pkgrel=2
pkgdesc="Various scripts for performing file-related operations such as editing and deleting." pkgdesc="Various scripts for performing file-related operations such as editing and deleting."
arch=(any) arch=(any)
license=(GPL3) license=(GPL3)
#depends=(bash fd fzf mlocate python python-termcolor) depends=(bash fd fzf mlocate python python-termcolor)
depends=(bash fd fzf)
makedepends=(git) makedepends=(git)
#makedepends=(git python-setuptools python-sphinx) makedepends=(git python-setuptools python-sphinx)
#checkdepends=(python-hypothesis python-pytest) checkdepends=(python-hypothesis python-pytest)
source=("${pkgname}::git+file:///home/etorres/Projects/file-scripts") source=("${pkgname}::git+file:///home/etorres/Projects/file-scripts")
install=$pkgname.install install=$pkgname.install
sha256sums=('SKIP') sha256sums=('SKIP')
pkgver() { pkgver() {
cd "${srcdir}/${pkgname}/bash" cd "${srcdir}/${pkgname}/bash"
bash version.sh bash version.sh --print
} }
package() { package() {
cd "${srcdir}/${pkgname}/bash" cd "${srcdir}/${pkgname}"
for script in bin/*; do for script in bash/bin/*; do
install -Dm755 "$script" "$pkgdir/usr/bin/$(basename -s '.sh' "$script")" install -Dm755 "$script" "$pkgdir/usr/bin/$(basename -s '.sh' "$script")"
done done
for libfile in *.sh; do for libfile in bash/*.sh; do
install -Dm644 "$libfile" "$pkgdir/usr/share/file-scripts/${libfile##*/}" install -Dm644 "$libfile" "$pkgdir/usr/share/file-scripts/$(basename "$libfile")"
done done
#python setup.py build
#python setup.py install --root="$pkgdir/" --optimize=1
# Install zsh completions # Install zsh completions
for completion in zsh; do for completion in zsh/*; do
install -m644 "${completion}" "${pkgdir}/usr/share/zsh/site-functions/${plugin##*.}" install -Dm644 "${completion}" "${pkgdir}/usr/share/zsh/site-functions/$(basename "$completion")"
done done
} }

View File

@ -4,4 +4,6 @@ MAJOR_VERSION=1
MINOR_VERSION=1 MINOR_VERSION=1
PATCH_VERSION=4 PATCH_VERSION=4
echo "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}" if [[ "$1" == '--print' ]]; then
echo "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
fi