Add some vars
This commit is contained in:
parent
103952bdb9
commit
7a77d03c7e
11
read_config
11
read_config
@ -22,6 +22,9 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
readonly UPDATEPSABEGIN=./.updatepsa/begin
|
readonly UPDATEPSABEGIN=./.updatepsa/begin
|
||||||
readonly UPDATEPSAEND=./.updatepsa/end
|
readonly UPDATEPSAEND=./.updatepsa/end
|
||||||
|
|
||||||
|
readonly OPKG_CMDS_TMP=/tmp/opkg_commands
|
||||||
|
readonly GIT_PULL_TMP=/tmp/git_pull
|
||||||
|
|
||||||
readonly PROGRAM=`basename $0`
|
readonly PROGRAM=`basename $0`
|
||||||
readonly WORKSPACE_DIR=workspace
|
readonly WORKSPACE_DIR=workspace
|
||||||
|
|
||||||
@ -97,13 +100,15 @@ if [ ${read_config_sourced:-1} = "1" ]; then # include only once
|
|||||||
compute_hash () {
|
compute_hash () {
|
||||||
if cd_customer_repository; then
|
if cd_customer_repository; then
|
||||||
local hash=""
|
local hash=""
|
||||||
if [[ -z $1 ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
hash=$(git log -n 1 --pretty=format:%H)
|
hash=$(git log -n 1 --pretty=format:%H)
|
||||||
else
|
else
|
||||||
hash=$(git log -n 1 --pretty=format:%H -- $1)
|
hash=$(git hash-object "$1")
|
||||||
fi
|
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
|
fi
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
compute_version () {
|
compute_version () {
|
||||||
|
Loading…
Reference in New Issue
Block a user