#!/bin/bash

# Download
cd /tmp
rm -f obsutil_linux_amd64.tar.gz
wget https://obs-community.obs.cn-north-1.myhuaweicloud.com/obsutil/current/obsutil_linux_amd64.tar.gz
rm -rf obsutil_linux_amd64_5.2.5
tar -zxf obsutil_linux_amd64.tar.gz

# Install
cd /usr/local/bin
rm -f obsutil
mv /tmp/obsutil_linux_amd64_5.2.5/obsutil /usr/local/bin/
chmod 755 /usr/local/bin/obsutil

# Delete package
rm -rf /tmp/obsutil_linux_amd64_5.2.5
rm -f /tmp/obsutil_linux_amd64.tar.gz

# Init config
#obsutil config -i=ak -k=sk -e=obs.cn-north-4.myhuaweicloud.com
