#!/bin/bash
#
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="$(readlink -f "$0")"

HERE="$(dirname "$0")"

# mkdir client_test
cd "$HERE" || exit
HERE=$(pwd)
export LD_LIBRARY_PATH=$HERE
# 检查/etc/timezone文件是否存在
if [ -f /etc/timezone ]; then
    # 读取文件内容，并去除可能的换行符
    TZ_CONTENT=$(cat /etc/timezone | tr -d '\n')

    # 判断内容是否为"Asia/Beijing"
    if [ "$TZ_CONTENT" = "Asia/Beijing" ]; then
        # 设置环境变量
        export TZ=Asia/Shanghai
        echo "Set TZ to Asia/Shanghai"
    fi
else
    echo "File /etc/timezone not found."
fi
./update_url.sh
chmod +x "$HERE/ebank"
# Note: exec -a below is a bashism.
exec -a "$0" "$HERE/ebank" "$@"
