From cc00650bc26fb99579df04f9bd4585c5c4bdca0f Mon Sep 17 00:00:00 2001 From: Jeena Date: Sun, 4 Jan 2026 17:46:16 +0900 Subject: [PATCH] Fix install script and update .gitignore Correct STATE_DIR to project dir, remove unnecessary pip3 check and ENV_FILE replacement for cleaner, accurate installation. Changes: - Set STATE_DIR to ./state in install.sh - Remove pip3 dependency check (included in venv) - Remove redundant ENV_FILE sed replacement - Update .gitignore to ignore state/ directory --- .gitignore | 3 +-- install.sh | 7 +------ last_run.txt | 1 + processed_message_ids.txt | 1 + 4 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 last_run.txt create mode 100644 processed_message_ids.txt diff --git a/.gitignore b/.gitignore index 2dfd7c2..165010f 100644 --- a/.gitignore +++ b/.gitignore @@ -136,5 +136,4 @@ dmypy.json .ruff_cache/ # Local data -processed_message_ids.txt -last_run.txt \ No newline at end of file +state/ \ No newline at end of file diff --git a/install.sh b/install.sh index 9444fe4..61fdd60 100755 --- a/install.sh +++ b/install.sh @@ -13,7 +13,7 @@ NC='\033[0m' # No Color # Default paths PROJECT_DIR="$(pwd)" -STATE_DIR="$HOME/.config/email_forwarder" +STATE_DIR="./state" ENV_FILE="./.env" # Functions @@ -23,10 +23,6 @@ check_dependencies() { echo -e "${RED}Error: python3 not found. Please install Python 3.${NC}" exit 1 fi - if ! command -v pip3 &> /dev/null; then - echo -e "${RED}Error: pip3 not found. Please install pip.${NC}" - exit 1 - fi if ! command -v systemctl &> /dev/null; then echo -e "${RED}Error: systemctl not found. Systemd required.${NC}" exit 1 @@ -64,7 +60,6 @@ setup_systemd() { # Replace placeholders sed -i "s|/path/to/your/email_forwarder|$PROJECT_DIR|g" "$HOME/.config/systemd/user/email_forwarder.service.d/override.conf" - sed -i "s|./.env|$ENV_FILE|g" "$HOME/.config/systemd/user/email_forwarder.service.d/override.conf" # Reload systemd systemctl --user daemon-reload diff --git a/last_run.txt b/last_run.txt new file mode 100644 index 0000000..76aba3d --- /dev/null +++ b/last_run.txt @@ -0,0 +1 @@ +2026-01-04T06:37:54.268895+00:00 \ No newline at end of file diff --git a/processed_message_ids.txt b/processed_message_ids.txt new file mode 100644 index 0000000..bcbd90b --- /dev/null +++ b/processed_message_ids.txt @@ -0,0 +1 @@ +<0101019b872dd6bd-d9c7e91c-78e7-499f-9469-35a68b3b3e29-000000@us-west-2.amazonses.com>