Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
calculate-utils-3-update/data/cl-git-wrapper

33 řádky
1.1 KiB

#!/bin/bash
# если выполняется обновление уже полученного репозитория
if [[ $1 == "pull" ]] || [[ $1 == "remote" ]]
then
# получить название репозитория
if [[ -f profiles/repo_name ]]
then
repo_name=$(/bin/cat profiles/repo_name)
else
repo_name=$(/bin/basename `pwd`)
fi
elif [[ $1 == "clone" ]]
then
repo_name=$(/bin/basename $3)
fi
# получить список репозиториев дистрибутива
native_reps=,$(/usr/libexec/calculate/cl-variable --value update.cl_update_rep_name),
# если обновляемый репозиторий от дистрибутива
if echo $native_reps | grep -q ,${repo_name},
then
if [[ $1 == "pull" ]]
then
# отбновить репозиторий через утилиты Calculate
/usr/sbin/cl-core --method update --rep $repo_name --sync-only on --skip-eix-update -T none
fi
else
# выполнить обновление через git
/usr/bin/git $*
fi