Skip to content

Commit

Permalink
Adapt setup summary script to work on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
vkucera committed Sep 26, 2024
1 parent be30a6c commit 0b470ad
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions docs/troubleshooting/summarise_o2p_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ else
fi

for repo in alidist O2 O2Physics; do
[[ -d "${repo}" ]] || { echo "Directory ${repo} not found."; continue; }
[[ -d "${repo}" ]] || { echo "Directory ${repo} not found in the current directory."; continue; }
echo "Last commit of ${repo}: $(cd "${repo}" && git log -n 1 --pretty="format:%ci %h")"
done

for pkg in O2 O2Physics; do
log="$ALIBUILD_WORK_DIR/BUILD/${pkg}-latest/log"
[[ -f "${log}" ]] || { echo "Log file ${log} not found."; continue; }
echo "Last build of ${pkg}: $(stat -c "%y" "${log}")"
done
cmdStat=""
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
cmdStat="stat -c %y"
elif [[ "$OSTYPE" == "darwin"* ]]; then
cmdStat="stat -f %Sm"
fi

if [[ -n "$cmdStat" ]]; then
for pkg in O2 O2Physics; do
log="$ALIBUILD_WORK_DIR/BUILD/${pkg}-latest/log"
[[ -f "${log}" ]] || { echo "Log file ${log} not found."; continue; }
echo "Last build of ${pkg}: $($cmdStat "${log}")"
done
fi

0 comments on commit 0b470ad

Please sign in to comment.