Add local development infrastructure and documentation
Add essential development tools and documentation for Cthulhu development: Development Scripts: - build-local.sh: Local build and install to ~/.local - clean-local.sh: Clean build artifacts and local installation - test-local.sh: Test local installation Documentation: - README-REMOTE-CONTROLLER.md: D-Bus service API documentation - README-DEVELOPMENT.md: Development workflow documentation - .gitignore: Updated with local build artifact patterns These tools enable efficient local development without system-wide installation and provide proper documentation for the D-Bus remote control capabilities. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
92
clean-local.sh
Executable file
92
clean-local.sh
Executable file
@ -0,0 +1,92 @@
|
||||
#!/bin/bash
|
||||
# Clean script for Cthulhu development
|
||||
# Removes build artifacts and optionally uninstalls local installation
|
||||
|
||||
set -e
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo -e "${GREEN}=== Cthulhu Clean Script ===${NC}"
|
||||
|
||||
LOCAL_PREFIX="$HOME/.local"
|
||||
|
||||
# Function to clean build artifacts
|
||||
clean_build() {
|
||||
echo -e "${YELLOW}Cleaning build artifacts...${NC}"
|
||||
|
||||
# Clean generated files
|
||||
make distclean 2>/dev/null || true
|
||||
|
||||
# Remove autotools generated files
|
||||
rm -rf autom4te.cache
|
||||
rm -f aclocal.m4 configure config.h.in config.h config.log config.status
|
||||
rm -f compile config.guess config.sub depcomp install-sh missing
|
||||
rm -f py-compile ltmain.sh libtool
|
||||
rm -f stamp-h1
|
||||
|
||||
# Remove generated Makefiles
|
||||
find . -name "Makefile" -delete 2>/dev/null || true
|
||||
find . -name "Makefile.in" -delete 2>/dev/null || true
|
||||
|
||||
# Remove Python bytecode
|
||||
find . -name "*.pyc" -delete 2>/dev/null || true
|
||||
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
# Remove generated .py files
|
||||
rm -f src/cthulhu/cthulhu_bin.py src/cthulhu/cthulhu_i18n.py src/cthulhu/cthulhu_platform.py
|
||||
|
||||
# Remove translation files
|
||||
find . -name "*.mo" -delete 2>/dev/null || true
|
||||
find . -name "*.pot" -delete 2>/dev/null || true
|
||||
|
||||
echo -e "${GREEN}Build artifacts cleaned.${NC}"
|
||||
}
|
||||
|
||||
# Function to uninstall local installation
|
||||
uninstall_local() {
|
||||
echo -e "${YELLOW}Uninstalling local Cthulhu installation...${NC}"
|
||||
|
||||
if [[ -f "${LOCAL_PREFIX}/bin/cthulhu" ]]; then
|
||||
# Remove binaries
|
||||
rm -f "${LOCAL_PREFIX}/bin/cthulhu"
|
||||
|
||||
# Remove Python modules
|
||||
rm -rf "${LOCAL_PREFIX}/lib/python"*/site-packages/cthulhu*
|
||||
|
||||
# Remove data files
|
||||
rm -rf "${LOCAL_PREFIX}/share/cthulhu"
|
||||
|
||||
# Remove docs
|
||||
rm -rf "${LOCAL_PREFIX}/share/help/*/cthulhu"
|
||||
|
||||
# Remove desktop files
|
||||
rm -f "${LOCAL_PREFIX}/share/applications/cthulhu"*
|
||||
|
||||
# Remove autostart
|
||||
rm -f "${LOCAL_PREFIX}/etc/xdg/autostart/cthulhu"*
|
||||
|
||||
echo -e "${GREEN}Local installation removed.${NC}"
|
||||
else
|
||||
echo -e "${YELLOW}No local installation found.${NC}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse arguments
|
||||
case "$1" in
|
||||
--build-only)
|
||||
clean_build
|
||||
;;
|
||||
--install-only)
|
||||
uninstall_local
|
||||
;;
|
||||
*)
|
||||
clean_build
|
||||
uninstall_local
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e "${GREEN}=== Clean Complete ===${NC}"
|
Reference in New Issue
Block a user