-
Notifications
You must be signed in to change notification settings - Fork 535
Add cleanup scripts to remove unwanted apps in the apps directory #1082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Currently removes all directories with "web-" and/or "vscode-nightly" in their name. This can easily be asjusted to remove any future directories that are pulled in from roo-code that are redundant. This is mostly done to remove redundant files that have no impact on kilocode.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new Bash script to clean up unwanted application directories under apps/
based on configurable name patterns, with an interactive confirmation step before deletion.
- Introduces
roomerge_04_apps_cleanup.sh
underscripts/kilocode
- Configurable
SEARCH_PATTERNS
and usesfind
to locate matching dirs - Prompts the user for confirmation and removes each directory
|
||
echo "Searching for directories matching patterns: $SEARCH_PATTERNS in $APP_DIR..." | ||
|
||
MATCHING_DIRS="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a Bash array to collect matching directories instead of building a newline-delimited string. Arrays handle spaces robustly and simplify iteration, e.g. MATCHING_DIRS=(); MATCHING_DIRS+=("$dir"); for dir in "${MATCHING_DIRS[@]}"; do ...
.
Copilot uses AI. Check for mistakes.
APP_DIR="$PROJECT_ROOT/apps" | ||
|
||
if [ ! -d "$APP_DIR" ]; then | ||
echo "Error: Directory $APP_DIR does not exist" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redirect error messages to stderr for clarity, e.g. echo "Error: Directory $APP_DIR does not exist" >&2
.
echo "Error: Directory $APP_DIR does not exist" | |
echo "Error: Directory $APP_DIR does not exist" >&2 |
Copilot uses AI. Check for mistakes.
@@ -0,0 +1,68 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per Kilocode Change Marking Guidelines, new files must include a // kilocode_change - new file
comment at the top. Please add this annotation above the shebang.
Copilot uses AI. Check for mistakes.
Context
Removes all directories in the apps directory with
web-
and/orvscode-nightly
in their name. This can easily be adjusted to remove any future directories that are pulled in from roo-code that are redundant.This is mostly done to remove redundant files that have no impact on kilocode.
Implementation
Run a bash scripts that scans in the
apps/
directory and does a name match to see what he finds. Gives a prompt with the results for a user to confirm before removing the files.How to Test
Run the scripts in using bash:
Check the output which should consist out of the following with the default search patterns: