Spaces:
Sleeping
Sleeping
chore: add files
Browse files- delete_extra_dirs.sh +29 -0
- requirements.txt +3 -0
delete_extra_dirs.sh
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Define the base directories (adjust if needed)
|
| 4 |
+
BASE_DIR1="$(pwd)/deployment/base_modules" # First base directory
|
| 5 |
+
BASE_DIR2="$(pwd)/deployment/smoother_module" # Second base directory
|
| 6 |
+
|
| 7 |
+
# Function to check directory and delete long numeric named directories
|
| 8 |
+
cleanup_directory() {
|
| 9 |
+
local DIR="$1"
|
| 10 |
+
|
| 11 |
+
# Check if the base directory exists
|
| 12 |
+
if [ ! -d "$DIR" ]; then
|
| 13 |
+
echo "Directory $DIR does not exist."
|
| 14 |
+
exit 1
|
| 15 |
+
fi
|
| 16 |
+
|
| 17 |
+
# Find and delete directories with long numeric names
|
| 18 |
+
echo "Searching for directories with long numeric names inside $DIR..."
|
| 19 |
+
|
| 20 |
+
find "$DIR" -type d -regextype posix-extended -regex '.*/[0-9]{15,}' -exec rm -rf {} +
|
| 21 |
+
|
| 22 |
+
# Confirm completion
|
| 23 |
+
echo "Cleanup complete for $DIR. All directories with long numeric names have been removed."
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
# Call the function for each base directory
|
| 27 |
+
cleanup_directory "$BASE_DIR1"
|
| 28 |
+
cleanup_directory "$BASE_DIR2"
|
| 29 |
+
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
concrete-ml==1.6.0
|
| 3 |
+
more-itertools==10.3.0
|