diff --git a/read_config b/read_config index 7cdc2b0..1eacaf8 100755 --- a/read_config +++ b/read_config @@ -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 () {