ereport script

This commit is contained in:
Zhongheng Liu 2026-05-19 09:45:27 +02:00
commit 96cf21afb2

12
scripts/ereport.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
set -euo pipefail
DATE=$(date -I)
REPORT_PATH=$HOME/ereport-$(date -I).txt
if [[ -f "$REPORT_PATH" ]]; then
echo "Today's report already exists at $REPORT_PATH!"
else
echo "Syncing repositories..."
# sudo emerge --sync >> "$REPORT_PATH"
echo "Writing update report..."
sudo emerge --update --newuse --deep @world --pretend >> "$REPORT_PATH"
fi