added extract_changed_files()
This commit is contained in:
parent
4a12ae9469
commit
c032d5d528
43
update_helpers.sh
Executable file → Normal file
43
update_helpers.sh
Executable file → Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# set -x
|
||||
|
||||
source ./log_helpers.sh
|
||||
source ./git_helpers.sh
|
||||
|
||||
extract_changed_files () {
|
||||
local func="${FUNCNAME[0]}"
|
||||
local files=$(changed_files)
|
||||
local updated_files=""
|
||||
|
||||
if [ -z $files ]; then
|
||||
log_crit "$func:${LINENO} no changed files!"
|
||||
else
|
||||
if grep -qE "update.conf" <<< $files ; then
|
||||
updated_files="${updated_files} update.conf"
|
||||
|
||||
if grep -qE "printer.conf" <<< $files ; then
|
||||
updated_files="${updated_files} printer.conf"
|
||||
fi
|
||||
|
||||
if grep -qE "emp.conf" <<< $files ; then
|
||||
updated_files="${updated_files} emp.conf"
|
||||
fi
|
||||
|
||||
if grep -qE "device.conf" <<< $files ; then
|
||||
updated_files="${updated_files} device.conf"
|
||||
fi
|
||||
else
|
||||
log_crit "$func:${LINENO} NO new revision of update.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
log_debug "$func:${LINENO} new revisions for $updated_files"
|
||||
printf "$updated_files"
|
||||
}
|
||||
|
||||
check_md5sum () {
|
||||
local func="${FUNCNAME[0]}"
|
||||
fn="/workspace/customer_281/szeged/1/1/etc/psa_config"
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user