Check current version of SSP from .deb file
This commit is contained in:
parent
d4fed686d0
commit
b640945618
|
@ -42,15 +42,22 @@ fi
|
|||
# }}}
|
||||
|
||||
# Vars {{{
|
||||
DEBUG=0
|
||||
DEBUG=1
|
||||
|
||||
script_wd=$(dirname "${0}")
|
||||
|
||||
ssp_install_dir="${1}"
|
||||
ssp_current_version=$(cd "${ssp_install_dir}" || exit 1 ; git status | head -n1 | cut -d" " -f4 | sed 's/v//g' ; cd - > /dev/null || exit 1)
|
||||
|
||||
ssp_repo_url="https://github.com/ltb-project/self-service-password"
|
||||
if [ $# -eq 1 ] ## If source directory should be used
|
||||
then
|
||||
ssp_install_dir="${1}"
|
||||
ssp_current_version=$(cd "${ssp_install_dir}" || exit 1 ; git status | head -n1 | cut -d" " -f4 ; cd - > /dev/null || exit 1)
|
||||
|
||||
ssp_new_version=$("${script_wd}"/releasetags "${ssp_repo_url}" | head -n1)
|
||||
else ## If .deb file should be used
|
||||
ssp_current_version=$(dpkg -l self-service-password | awk '/^ii.*self-service-password/ { print $3}' | sed 's/\(.*\)-.*/\1/')
|
||||
|
||||
ssp_new_version=$("${script_wd}"/releasetags "${ssp_repo_url}" | head -n1 | sed 's/v//g')
|
||||
fi
|
||||
|
||||
ssp_new_version_file="/tmp/.github.self-service-password.upgrade"
|
||||
# }}}
|
||||
|
|
Loading…
Reference in New Issue