Files
Fabric/internal/plugins/template/Examples/track_packages.sh
Kayvan Sylvan 4004c51b9e refactor: restructure project to align with standard Go layout
### CHANGES

- Introduce `cmd` directory for all main application binaries.
- Move all Go packages into the `internal` directory.
- Rename the `restapi` package to `server` for clarity.
- Consolidate patterns and strategies into a new `data` directory.
- Group all auxiliary scripts into a new `scripts` directory.
- Move all documentation and images into a `docs` directory.
- Update all Go import paths to reflect the new structure.
- Adjust CI/CD workflows and build commands for new layout.
2025-07-08 22:47:17 -07:00

19 lines
484 B
Bash
Executable File

#!/bin/bash
LOG_DIR="/var/log/package_tracking"
DATE=$(date +%Y%m%d)
# Ensure directory exists
mkdir -p "$LOG_DIR"
# Current package list
dpkg -l > "$LOG_DIR/packages_current.list"
# Create diff if previous exists
if [ -f "$LOG_DIR/packages_previous.list" ]; then
diff "$LOG_DIR/packages_previous.list" "$LOG_DIR/packages_current.list" > "$LOG_DIR/changes_current.diff"
fi
# Keep copy for next comparison
cp "$LOG_DIR/packages_current.list" "$LOG_DIR/packages_previous.list"