Remove unnecessary clean option

This commit is contained in:
Ryan Hughes
2025-10-23 00:50:22 -04:00
parent b7dde19221
commit 93865d706c
2 changed files with 3 additions and 18 deletions
-8
View File
@@ -51,7 +51,6 @@ update_database() {
# Run repo-add in Docker container
docker run --rm \
-e ARCH="$ARCH" \
-e CLEAN_BUILD="$CLEAN_BUILD" \
-v "$BUILD_ROOT/output:/output" \
-v "$BUILD_DIR:/build:ro" \
omarchy-aur-builder:latest /build/update-repo.sh
@@ -62,14 +61,8 @@ main() {
print_header "Omarchy Repository Database Manager"
# Parse command line arguments
CLEAN_BUILD=false
while [[ $# -gt 0 ]]; do
case $1 in
--clean)
CLEAN_BUILD=true
shift
;;
--arch)
ARCH="$2"
shift 2
@@ -79,7 +72,6 @@ main() {
echo ""
echo "Options:"
echo " --arch <arch> Target architecture (x86_64 or aarch64, default: x86_64)"
echo " --clean Remove existing database and rebuild from scratch"
echo " -h, --help Show this help message"
exit 0
;;
+3 -10
View File
@@ -10,16 +10,9 @@ DB_FILE="$OUTPUT_DIR/${REPO_NAME}.db.tar.zst"
cd "$OUTPUT_DIR"
# If clean build requested, remove ALL database files first
if [[ "$CLEAN_BUILD" == true ]]; then
echo "==> Clean build requested - removing all database files..."
rm -f "${REPO_NAME}.db"* "${REPO_NAME}.files"*
else
# Remove old database files and symlinks
rm -f "${REPO_NAME}.db" "${REPO_NAME}.db.tar.zst"
rm -f "${REPO_NAME}.files" "${REPO_NAME}.files.tar.zst"
rm -f "${REPO_NAME}.db.tar.zst.old" "${REPO_NAME}.files.tar.zst.old"
fi
# Remove old database files (repo-add will create new ones)
rm -f "${REPO_NAME}.db" "${REPO_NAME}.db.tar.zst"
rm -f "${REPO_NAME}.files" "${REPO_NAME}.files.tar.zst"
# Check if there are any packages
if ! ls *.pkg.tar.* 1>/dev/null 2>&1; then