[enh] Default version number for ynh_install_app_dependencies

This commit is contained in:
Maniack Crudelis 2017-12-10 23:38:09 +01:00 committed by GitHub
parent 1c367895b0
commit 4276aebfa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,9 @@ ynh_install_app_dependencies () {
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
fi fi
version=$(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file. version=$(grep '\"version\": ' "$manifest_path" | cut -d '"' -f 4) # Retrieve the version number in the manifest file.
if [ " ${#version}" -eq 0 ]; then
version="1.0"
if
dep_app=${app//_/-} # Replace all '_' by '-' dep_app=${app//_/-} # Replace all '_' by '-'
cat > /tmp/${dep_app}-ynh-deps.control << EOF # Make a control file for equivs-build cat > /tmp/${dep_app}-ynh-deps.control << EOF # Make a control file for equivs-build