fix: error when executing outside git repo
This commit is contained in:
parent
91ac4bbdb7
commit
8c48956267
2 changed files with 2 additions and 2 deletions
2
instalee
2
instalee
|
@ -103,7 +103,7 @@ installpkg() {
|
|||
|
||||
## EXECUTION
|
||||
|
||||
version=$(printf "$name r%s.%s%s" "$(git rev-list --count HEAD 2>/dev/null)" "$(git rev-parse --short HEAD 2>/dev/null)" "$(git diff-index HEAD | wc -l | sed 's|^[1-9]|-mod\0|')")
|
||||
version=$(printf "$name r%s.%s%s" "$(git rev-list --count HEAD 2>/dev/null)" "$(git rev-parse --short HEAD 2>/dev/null)" "$(git diff-index HEAD 2>/dev/null | wc -l | sed 's|^[1-9]|-mod\0|')")
|
||||
while true
|
||||
do case "$1" in
|
||||
(-V|--version|"")
|
||||
|
|
|
@ -17,6 +17,6 @@ pkgver="$({ git describe --long --tags 2>/dev/null || printf "r%s.%s" "$(git rev
|
|||
sudo sed -i "s/r%s[^\"]*\"/version ${pkgver}\"/" "$bin/${_pkgname}"
|
||||
|
||||
echo "export INSTALEE_HOME=$PWD" | sudo tee /etc/profile.d/instalee.sh
|
||||
echo "Exported HOME directory to /etc/profile.d - re-login for global use to work."
|
||||
echo "Exported INSTALEE_HOME directory under /etc/profile.d - re-login for global use to work."
|
||||
echo -n "Installed "
|
||||
$bin/instalee --version
|
||||
|
|
Loading…
Add table
Reference in a new issue