check update added
This commit is contained in:
parent
dfe068591a
commit
5129c55605
36
check_update.sh
Executable file
36
check_update.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
value=$(<csv/system_info.json)
|
||||
echo "${value}"
|
||||
|
||||
IFS=:, read -ra x <<< "$value"
|
||||
|
||||
|
||||
|
||||
for i in ${x[@]}
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
|
||||
|
||||
[ $(git rev-parse HEAD) = $(git ls-remote $(git rev-parse --abbrev-ref @{u} | \
|
||||
sed 's/\// /g') | cut -f1) ] && x[1]=" false" || x[1]=" true"
|
||||
|
||||
|
||||
str1=$(IFS=:; echo "${x[*]:0:2}")
|
||||
str2=$(IFS=:; echo "${x[*]:2:2}")
|
||||
|
||||
ar2=("${str1}" "${str2}")
|
||||
for i in ${ar2[@]}
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
|
||||
str=$(IFS=,; echo "${ar2[*]}")
|
||||
|
||||
|
||||
rm csv/system_info.json
|
||||
echo "$str" >> csv/system_info.json
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user