installer/utils/package_upload/repos.rake in rhoconnect-3.0.6 vs installer/utils/package_upload/repos.rake in rhoconnect-3.1.0.beta1

- old
+ new

@@ -11,10 +11,12 @@ def cmd(cmd) puts cmd unless @raked system(cmd) end #cmd + # METHODS + def prepare_destination # Prompt to remove the /deb directory if it exists if File.directory?("#{PKG_DIR}/deb") if !@raked puts "Remove #{PKG_DIR}/deb?" @@ -29,19 +31,20 @@ # Create deb directory if it does not already exist cmd "sudo mkdir -p #{PKG_DIR}/deb" unless File.directory?("#{PKG_DIR}/deb") # Create configuration file "ditributions" in deb directory - filename = "#{PKG_DIR}/deb/conf/" + filename = "#{PKG_DIR}/deb/conf" cmd "sudo mkdir -p #{filename}" distributions = "Origin: Rhomobile, Inc.\n" + "Label: Rhomobile, Inc.\n" + "Codename: rhoconnect\n" + "Architectures: i386 amd64\n" + "Components: main\n" + "Description: Rhoconnect APT Repository" - cmd "touch #{filename}/distributions" + cmd "sudo touch #{filename}/distributions" + cmd "sudo chmod 777 #{filename}/distributions" # Write distributions string to corresponding file dist_file = File.new("#{filename}/distributions", "w") dist_file.write(distributions) dist_file.close @@ -70,10 +73,10 @@ end #copy_files @raked = true prepare_destination - + copy_files # REPOIFY! cmd "sudo reprepro -b #{PKG_DIR}/deb includedeb rhoconnect #{PKG_DIR}/deb/#{@deb_pkg}" cmd "sudo createrepo #{PKG_DIR}/rpm"