Remove unnecessary clean option

This commit is contained in:
Ryan Hughes committed 2025-10-23 00:50:22 -04:00
1 parent b7dde19221
commit 93865d706c
2 files changed
+3 -18

No files matched your search

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