alias

#!/bin/bash

funcs=`which study_functions.sh`
if [ "$funcs" != "" ] ;then
echo "funcs=$funcs"
. $funcs
else
funcs=./study_functions.sh
if [ "$funcs" != "" ] ;then
echo "funcs=$funcs"
. $funcs
else
echo "./study_functions.sh not exist!"
return
fi
fi

function repo_init()
{
repo init xxx
repo_sync_help
}

function repo_sync_help()
{
while :
do
echo "choose the repository you want to download"
echo -e "\033[32m1.ap\n2.xxx\n3.xxx\n4.xxx\n5.all\n6.quit\033[0m"
read -p "input number: " name
case $name in
"1")
repo sync xxx
;;
"2")
repo sync xxx
;;
"3")
repo sync xxx
;;
"4")
repo sync xxx
;;
"5")
repo sync -c -j 4
break
;;
"6")
break
;;
*)
echo -e "\033[31m$1\033[0mfailed: Incorrect number $name."
;;
esac
done
}

function cb() {
date=$(date "+%y%m%d%H%M%S")
repo start $date --all
}

function source_bash()
{
bak_dir=$PWD
cd && source .bashrc
cd $bak_dir
echo -e "\033[32msource .bashrc ok\033[0m"
}

 

posted @ 2024-03-23 23:02  乐观的知觉  阅读(5)  评论(0编辑  收藏  举报