[file-store-4] fix import

This commit is contained in:
Alexander Machehin 2012-11-15 16:26:36 +06:00
parent 41ce06b36e
commit fc3350d8b7
2 changed files with 4 additions and 4 deletions

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash
# import_srpm.sh: Import SRPM packages to git repo
pwd=$PWD
# Input data
srpm_path=$1
git_path=$2
git_branch=$3
token=$4
script=$4
token=$5
name=$(rpm -q --qf '[%{Name}]' -p $srpm_path)
version=$(rpm -q --qf '[%{Version}-%{Release}]' -p $srpm_path)
tmp_dir=/tmp/$name-$version-$RANDOM
@ -32,7 +32,7 @@ cpio -idv < srpm.cpio
rm -f srpm.cpio
# Remove archives
$pwd/file-store.rb $token $PWD
$script $token
# Commit and push changes
git add -A .

View File

@ -93,7 +93,7 @@ module Modules
def import_srpm(srpm_path = srpm.path, branch_name = 'import')
token = User.find_by_uname('rosa_system').authentication_token
system("#{Rails.root.join('bin', 'import_srpm.sh')} #{srpm_path} #{path} #{branch_name} #{token} >> /dev/null 2>&1")
system("#{Rails.root.join('bin', 'import_srpm.sh')} #{srpm_path} #{path} #{branch_name} #{Rails.root.join('bin', 'file-store.rb')} #{token} >> /dev/null 2>&1")
end
protected