1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/release.sh
naruse 934546eb0b add release script on ftp.r-l.o
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 15:43:36 +00:00

35 lines
708 B
Bash

#!/bin/sh
RUBYDIR=/home/ftp/pub/ruby
releases=`ls ruby-*|grep -o 'ruby-[0-9]\.[0-9]\.[0-9]\(-\(preview\|rc\|p\)[0-9]\{1,4\}\)\?'|uniq`
# check files
for r in $releases
do
echo "checking files for $r..."
if ! [ -f $r.tar.gz ];then
echo "ERROR: $r.tar.gz not found"
exit 1
elif ! [ -f $r.tar.bz2 ];then
echo "ERROR: $r.tar.bz2 not found"
exit 1
elif ! [ -f $r.zip ];then
echo "ERROR: $r.zip not found"
exit 1
else
echo "files are ok"
fi
done
# version directory
for r in $releases
do
xy=`echo $r|grep -o '[0-9]\.[0-9]'`
dir="${RUBYDIR}/$xy"
echo "$dir"
mkdir -p $dir
cp $r.tar.gz $dir/$r.tar.gz
cp $r.tar.bz2 $dir/$r.tar.bz2
cp $r.zip $dir/$r.zip
done