Skip to contents

Downloads the latest _brand.yml file from the repository and compares it with the local _brand.yml file. If they are different, prompts the user to overwrite the local file. If the local file does not exist, it will be created.

Usage

get_brand()

Value

No return value. Side effects: may overwrite _brand.yml and create bak_brand.yml.

Details

Reads configuration from config.yml. Handles download errors and file comparison using MD5 hashes. Prompts user for action if files differ.

Examples

# Initialize config and local brand file
brand_init()
# Update local brand file if needed
get_brand()
#> Checking remote version... 
#> The local file is different from the remote file.
#> 1: Overwrite the local file with the remote file
#> 2: Overwrite the local file with the remote file and save a backup to bak_brand.yml
#> 3: Do nothing
#> 
#> Please Select an option: (1/2/3): 
#>