#!/bin/bash
###
 # @Author       : lqm283
 # @Date         : 2024-06-28 11:17:28
 # @LastEditTime : 2025-03-16 09:23:34
 # @LastEditors  : lqm283
 # --------------------------------------------------------------------------------<
 # @Description  : Please edit a descrition about this file at here.
 # --------------------------------------------------------------------------------<
###
ROOT=`pwd`
script_file=$0
url=ssh://git@gitlab.veryark.cn:3399/developer/pump/tower-f1g/manifest.git
version=main
manifest=develop

if [ -n "$1" ]; then
    manifest=$1
fi

if [ -n "$2" ] && [ "$manifest" == "release" ]; then
    version=$2
fi

function __exit()
{
    cd $ROOT
    rm $ROOT/$script_file
}

wget https://script.veryark.cn/project_init.sh --no-check-certificate
trap __exit EXIT
bash project_init.sh -u $url -b $version -m $manifest.xml
