aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-09-18 17:10:44 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-09-18 17:10:44 -0300
commit6a3c06742011a60061487a3def01e87883f5a560 (patch)
tree693b749f613c71f69b3f93c4a76ad1569602b492
parent3442ee78ec17ad97fc16524480f3f3e4f6a37ee6 (diff)
downloadstowpkg-6a3c06742011a60061487a3def01e87883f5a560.tar.gz
stowpkg-6a3c06742011a60061487a3def01e87883f5a560.tar.bz2
Distinguish between version and source_version
-rwxr-xr-xstowpkg17
1 files changed, 12 insertions, 5 deletions
diff --git a/stowpkg b/stowpkg
index 33e5eb6..1263045 100755
--- a/stowpkg
+++ b/stowpkg
@@ -123,6 +123,12 @@ stowpkg_install () {
version="latest"
fi
+ if [ "$source_format" = "git" ]; then
+ source_version="git"
+ else
+ source_version="$version"
+ fi
+
# Resolve default dependencies
if [ ! -z "$dependencies_stowpkg" ]; then
for dependency in $dependencies_stowpkg; do
@@ -141,19 +147,20 @@ stowpkg_install () {
cd $SOURCES
# Download sources if needed
- if [ ! -d "${package}-${version}" ]; then
+ if [ ! -d "${package}-${source_version}" ]; then
if [ "$source_format" = "git" ]; then
- git clone $url ${package}-${version}
+ git clone $url ${package}-${source_version}
fi
fi
- # Go to source folder
- if [ ! -d "${package}-${version}" ]; then
+ # Check source
+ if [ ! -d "${package}-${source_version}" ]; then
echo "$BASENAME: source not found for package $package"
exit 1
fi
- cd ${package}-${version}
+ # Go to source folder
+ cd ${package}-${source_version}
if [ "$source_format" = "git" ]; then
git fetch --all