summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD20
-rw-r--r--bash-it-git.install2
-rw-r--r--custom.lib.bash.shim (renamed from custom.bash)0
-rwxr-xr-xinstall.sh.wrapper (renamed from install-bash-it)10
4 files changed, 16 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b24388e89d5..e1ebab6e748 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -33,8 +33,8 @@ install="${pkgname}.install"
source=(
'https://github.com/Bash-it/bash-it/tarball/master'
'LICENSE'
- 'custom.bash'
- 'install-bash-it'
+ 'custom.lib.bash.shim'
+ 'install.sh.wrapper'
)
sha512sums=(
'SKIP'
@@ -59,7 +59,6 @@ prepare() {
package() {
# All upstream-provided files go into the /usr hierarchy
- mkdir -p "${pkgdir}/usr/bin"
mkdir -p "${pkgdir}/usr/lib/${pkgname}"
mkdir -p "${pkgdir}/usr/share/${pkgname}"
mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
@@ -69,24 +68,27 @@ package() {
"${pkgdir}/usr/share/licenses/${pkgname}" \
"${srcdir}/LICENSE"
- cp --preserve=mode -t \
- "${pkgdir}/usr/bin" \
- "${srcdir}/install-bash-it"
-
cp -r --preserve=mode -t "${pkgdir}/usr/lib/${pkgname}" \
"${srcdir}"/{bash_it,install,uninstall}.sh \
"${srcdir}"/{aliases,completion,custom,lib} \
"${srcdir}"/{plugins,themes}
# Copy warning shim to `lib/custom.bash`
- cp --preserve=mode -t "${pkgdir}/usr/lib/${pkgname}/lib" \
- "${srcdir}/custom.bash"
+ cp --preserve=mode \
+ "${srcdir}/custom.lib.bash.shim" \
+ "${pkgdir}/usr/lib/${pkgname}/lib/custom.bash"
# `.editorconfig` it not meant to be user-editable
cp -r --preserve=mode -t "${pkgdir}/usr/share/${pkgname}" \
"${srcdir}/.editorconfig" \
+ "${srcdir}/install.sh" \
"${srcdir}/template"
+ # Copy wrapper for `install.sh`
+ cp --preserve=mode \
+ "${srcdir}/install.sh.wrapper" \
+ "${pkgdir}/usr/share/${pkgname}/install.sh"
+
cp --preserve=mode -t "${pkgdir}/usr/share/doc/${pkgname}" \
"${srcdir}"/*.md
diff --git a/bash-it-git.install b/bash-it-git.install
index 4fea1890ccb..89da636f97a 100644
--- a/bash-it-git.install
+++ b/bash-it-git.install
@@ -1,6 +1,6 @@
post_install() {
echo >&2 'Note: To install bash-it for the logged-in user,' \
- 'run: install-bash-it'
+ 'run: /usr/share/bash-it-git/install'
}
post_remove() {
diff --git a/custom.bash b/custom.lib.bash.shim
index 441460f41b0..441460f41b0 100644
--- a/custom.bash
+++ b/custom.lib.bash.shim
diff --git a/install-bash-it b/install.sh.wrapper
index 5a59dc2d16a..4eaa5bcdcaf 100755
--- a/install-bash-it
+++ b/install.sh.wrapper
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env sh
set -e
if [[ "$(whoami)" != "$(logname)" ]]; then
@@ -7,10 +7,8 @@ if [[ "$(whoami)" != "$(logname)" ]]; then
exit 1
fi
-echo >&2 'Installing files into ~/.bash_it'
-
-cp -irvP --preserve=mode,links -t ~/ \
+cp -ruvP --preserve=mode,links -t ~/ \
"/usr/share/bash-it-git/home_factory/.bash_it"
-echo >&2 'To complete the installation, run: ~/.bash_it/install.sh'
-~/.bash_it/install.sh --help >&2
+cd ~/.bash_it
+./install.sh "$@"