Fix: folder structure

This commit is contained in:
hyzen
2026-02-08 12:58:22 +05:30
parent 4018f46093
commit 0a8e51981f

View File

@@ -95,14 +95,11 @@ echo "Using F$next_fkey for this account (ACCOUNT$account_num)"
echo "SMTP: $smtp_proto on port $smtp_port" echo "SMTP: $smtp_proto on port $smtp_port"
echo echo
# Create account directory (without TLD) # Create .mutt directory if it doesn't exist
account_dir="$HOME/.mutt/${shortname}" mkdir -p "$HOME/.mutt"
mkdir -p "$account_dir"
# Create password file for reference # Config file will be named after the account name
pass_file="$account_dir/pass" config_file="$HOME/.mutt/${shortname}"
printf '%s' "$password" > "$pass_file"
chmod 600 "$pass_file"
# Escape password for use in double quotes (for IMAP) # Escape password for use in double quotes (for IMAP)
# Escape backslashes first, then double quotes, then dollar signs, then backticks # Escape backslashes first, then double quotes, then dollar signs, then backticks
@@ -127,8 +124,6 @@ for ((i=0; i<${#password}; i++)); do
done done
# Create config file # Create config file
config_file="$account_dir/config"
if [ "$use_starttls" = true ]; then if [ "$use_starttls" = true ]; then
# STARTTLS - hardcode both passwords # STARTTLS - hardcode both passwords
cat > "$config_file" << EOF cat > "$config_file" << EOF
@@ -179,7 +174,6 @@ EOF
fi fi
echo "Created config file: $config_file" echo "Created config file: $config_file"
echo "Created password file in: $account_dir"
# Backup .muttrc # Backup .muttrc
cp "$mutt_config" "${mutt_config}.backup.$(date +%Y%m%d_%H%M%S)" cp "$mutt_config" "${mutt_config}.backup.$(date +%Y%m%d_%H%M%S)"