diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-09-18 17:10:44 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-09-18 17:10:44 -0300 |
commit | 6a3c06742011a60061487a3def01e87883f5a560 (patch) | |
tree | 693b749f613c71f69b3f93c4a76ad1569602b492 | |
parent | 3442ee78ec17ad97fc16524480f3f3e4f6a37ee6 (diff) | |
download | stowpkg-6a3c06742011a60061487a3def01e87883f5a560.tar.gz stowpkg-6a3c06742011a60061487a3def01e87883f5a560.tar.bz2 |
Distinguish between version and source_version
-rwxr-xr-x | stowpkg | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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 |