代码拉取完成,页面将自动刷新
cd obs_pkg_rpms
git fetch --all
git reset --hard origin
obspkgrpmsdir=`pwd`
sourcedir="/srv/cache/obs/tar_scm/repo/next/"
branch=$1
if [[ "$branch" == "master" ]];then
cd $sourcedir/openEuler
else
cd $sourcedir/$branch
fi
pkglist=`ls`
for pkg in $pkglist
do
cd $pkg
day=`git show -s --format=%ad | awk '{print $3}'`
year=`git show -s --format=%ad | awk '{print $5}'`
month=`git show -s --format=%ad | awk '{print $2}'`
timestr=`git show -s --format=%ad | awk '{print $4}'`
if [[ "$month" == "Jan" ]];then
month="01"
elif [[ "$month" == "Feb" ]];then
month="02"
elif [[ "$month" == "Mar" ]];then
month="03"
elif [[ "$month" == "Apr" ]];then
month="04"
elif [[ "$month" == "May" ]];then
month="05"
elif [[ "$month" == "Jun" ]];then
month="06"
elif [[ "$month" == "Jul" ]];then
month="07"
elif [[ "$month" == "Aug" ]];then
month="08"
elif [[ "$month" == "Sep" ]];then
month="09"
elif [[ "$month" == "Oct" ]];then
month="10"
elif [[ "$month" == "Nov" ]];then
month="11"
elif [[ "$month" == "Dec" ]];then
month="12"
fi
if [ ${day} -lt 10 ];then
day="0${day}"
fi
datestr="${year}${month}${day} ${timestr//:/-}"
echo $datestr > ${obspkgrpmsdir}/${branch}/${pkg}
if [[ "$branch" == "master" ]];then
cd $sourcedir/openEuler
else
cd $sourcedir/$branch
fi
done
cd ${obspkgrpmsdir}
git pull
git add *
git commit -m "update date for package"
git push
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。