|
|
|
@ -81,8 +81,6 @@ echo "updatable: $updatable"
|
|
|
|
|
|
|
|
|
|
#if check-all succeeded to download the repo to the update folder
|
|
|
|
|
if [ -d "${DIRECTORY}/update" ];then
|
|
|
|
|
PREIFS="$IFS"
|
|
|
|
|
IFS="|"
|
|
|
|
|
|
|
|
|
|
#mainfiles="$(echo -e "$(ls -Rp "${DIRECTORY}/update/pi-apps")\n$(ls -Rp "${DIRECTORY}")" | grep -v '/' | sort | uniq | tr '\n' '|')"
|
|
|
|
|
|
|
|
|
@ -94,18 +92,18 @@ if [ -d "${DIRECTORY}/update" ];then
|
|
|
|
|
cd "${DIRECTORY}"
|
|
|
|
|
localfiles="$(find . -type f | cut -c 3- | grep -v '.git/' | grep -v 'apps/' | grep -v 'data/' | grep -v 'xlunch/')"
|
|
|
|
|
|
|
|
|
|
mergedfiles="$(echo -e "${localfiles}\n${updatefiles}" | sort | uniq | tr '\n' '|')"
|
|
|
|
|
mergedfiles="$(echo -e "${localfiles}\n${updatefiles}" | sort | uniq)"
|
|
|
|
|
|
|
|
|
|
#exclude files mentioned in data/update-exclusion file
|
|
|
|
|
PREIFS="$IFS"
|
|
|
|
|
IFS=$'\n' #exclude commented lines
|
|
|
|
|
for file in $(cat data/update-exclusion | grep "^[^#;]")
|
|
|
|
|
for file in $(cat "${DIRECTORY}/data/update-exclusion" | grep "^[^#;]")
|
|
|
|
|
do
|
|
|
|
|
mergedfiles="$(echo "$mergedfiles" | grep -v "$file")"
|
|
|
|
|
echo "Excluding $file from the mergedlist."
|
|
|
|
|
echo "Excluding '$file' from the mergedlist."
|
|
|
|
|
done
|
|
|
|
|
IFS="$PREIFS" # back to IFS='|'
|
|
|
|
|
IFS="|" # back to IFS='|'
|
|
|
|
|
|
|
|
|
|
mergedfiles="$(echo "$mergedfiles" | tr '\n' '|')"
|
|
|
|
|
for file in $mergedfiles
|
|
|
|
|
do
|
|
|
|
|
newhash=$(cat "${DIRECTORY}/update/pi-apps/${file}" 2>/dev/null | sha1sum | awk '{print $1}' | sha1sum | awk '{print $1}')
|
|
|
|
|