Add some vars

This commit is contained in:
Gerhard Hoffmann 2022-06-07 22:32:46 +02:00
parent 103952bdb9
commit 7a77d03c7e

View File

@ -22,6 +22,9 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
readonly UPDATEPSABEGIN=./.updatepsa/begin
readonly UPDATEPSAEND=./.updatepsa/end
readonly OPKG_CMDS_TMP=/tmp/opkg_commands
readonly GIT_PULL_TMP=/tmp/git_pull
readonly PROGRAM=`basename $0`
readonly WORKSPACE_DIR=workspace
@ -97,13 +100,15 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
compute_hash () {
if cd_customer_repository; then
local hash=""
if [[ -z $1 ]]; then
if [[ -z "$1" ]]; then
hash=$(git log -n 1 --pretty=format:%H)
else
hash=$(git log -n 1 --pretty=format:%H -- $1)
hash=$(git hash-object "$1")
fi
echo ${hash:0:10} # return the first 10 hex characters
cd_home ; echo ${hash:0:10} # return the first 10 hex characters
return 0
fi
return 1
}
compute_version () {