Skip to content

Commit

Permalink
♻️ refactor: remove unpack commands
Browse files Browse the repository at this point in the history
  • Loading branch information
cy948 committed Jan 4, 2025
1 parent 4079700 commit c91ce3c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
Binary file removed docker-compose/local/s3_data.tar.gz
Binary file not shown.
23 changes: 0 additions & 23 deletions docker-compose/local/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ FILES=(
"$SUB_DIR/docker-compose.yml"
"$SUB_DIR/.env.example"
"$SUB_DIR/init_data.json"
"$SUB_DIR/s3_data.tar.gz"
)

# Supported languages and messages
Expand Down Expand Up @@ -216,24 +215,6 @@ download_file() {
wget -q --show-progress "$file_url" -O "$local_file"
}

extract_file() {
local file_name=$1
local target_dir=$2

if [ -e "$file_name" ]; then
tar -zxvf "$file_name" -C "$target_dir" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "$file_name" $(show_message "extracted_success") "$target_dir"
else
echo "$file_name" $(show_message "extracted_failed")
exit 1
fi
else
echo "$file_name" $(show_message "file_not_exists")
exit 1
fi
}

# Define colors
declare -A colors
colors=(
Expand Down Expand Up @@ -269,10 +250,6 @@ download_file "$SOURCE_URL/${FILES[1]}" ".env"
download_file "$SOURCE_URL/${FILES[2]}" "init_data.json"
download_file "$SOURCE_URL/${FILES[3]}" "s3_data.tar.gz"

# Extract .tar.gz file without output
extract_file "s3_data.tar.gz" "."
rm s3_data.tar.gz

# ==========================
# === Regenerate Secrets ===
# ==========================
Expand Down

0 comments on commit c91ce3c

Please sign in to comment.