Created
August 16, 2023 13:59
-
-
Save LeSpocky/e84edf52bf4501a45809df08635e2869 to your computer and use it in GitHub Desktop.
detect changes on BSP files shadowing ptxdist files after migrate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SCRIPTDIR=$(dirname "${0}") | |
PTXDIST_SRC=$1 | |
PTXDIST_VER_FROM=$2 | |
PTXDIST_VER_TO=$3 | |
PTXDIST_BASEDIR='/usr/local/lib' | |
PTXDIST_TOPDIR="$(ptxdist print PTXDIST_TOPDIR)" | |
PTXDIST_WORKSPACE="$(ptxdist print PTXDIST_WORKSPACE)" | |
PTXDIST_PLATFORMCONFIGDIR="$(ptxdist print PTXDIST_PLATFORMCONFIGDIR)" | |
. "${SCRIPTDIR}/colsh/colsh_definitions.inc" | |
. "${SCRIPTDIR}/colsh/colsh_cecho.inc" | |
if [ ! "${PTXDIST_TOPDIR}" = "${PTXDIST_BASEDIR}/ptxdist-${PTXDIST_VER_TO}" ] | |
then | |
cecho --err 'Wrong TO version!' | |
exit 1 | |
fi | |
pushd "${PTXDIST_SRC}" | |
git diff --stat --name-only "ptxdist-${PTXDIST_VER_FROM}..ptxdist-${PTXDIST_VER_TO}" \ | |
| while read -r line | |
do | |
# usual files | |
if [ -f "${PTXDIST_WORKSPACE}/${line}" ] | |
then | |
cecho --warn "=== ${line}" | |
colordiff -bus "${PTXDIST_WORKSPACE}/${line}" "${PTXDIST_TOPDIR}/${line}" | |
fi | |
# platform files | |
if [ -f "${PTXDIST_PLATFORMCONFIGDIR}/${line}" ] | |
then | |
cecho --warn "=== ${line}" | |
colordiff -bus "${PTXDIST_PLATFORMCONFIGDIR}/${line}" "${PTXDIST_TOPDIR}/${line}" | |
fi | |
done | |
popd | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment