mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-08-17 03:40:11 +02:00
Get non-interactive bash env right
This commit is contained in:
parent
d5df260c88
commit
0658a9b8ac
@ -19,14 +19,14 @@ end
|
|||||||
execute "add-android-sdk-path" do
|
execute "add-android-sdk-path" do
|
||||||
user user
|
user user
|
||||||
path = "#{sdk_loc}/tools:#{sdk_loc}/platform-tools"
|
path = "#{sdk_loc}/tools:#{sdk_loc}/platform-tools"
|
||||||
command "echo \"export PATH=\\$PATH:#{path} #PATH-SDK\" >> /home/#{user}/.bashrc"
|
command "echo \"export PATH=\\$PATH:#{path} #PATH-SDK\" >> /home/#{user}/.bsenv"
|
||||||
not_if "grep PATH-SDK /home/#{user}/.bashrc"
|
not_if "grep PATH-SDK /home/#{user}/.bsenv"
|
||||||
end
|
end
|
||||||
|
|
||||||
execute "add-android-home" do
|
execute "add-android-home" do
|
||||||
user user
|
user user
|
||||||
command "echo \"export ANDROID_HOME=#{sdk_loc}\" >> /home/#{user}/.bashrc"
|
command "echo \"export ANDROID_HOME=#{sdk_loc}\" >> /home/#{user}/.bsenv"
|
||||||
not_if "grep ANDROID_HOME /home/#{user}/.bashrc"
|
not_if "grep ANDROID_HOME /home/#{user}/.bsenv"
|
||||||
end
|
end
|
||||||
|
|
||||||
%w{17.0.0 18.0.1}.each do |ver|
|
%w{17.0.0 18.0.1}.each do |ver|
|
||||||
|
@ -27,13 +27,18 @@ end
|
|||||||
|
|
||||||
execute "add-gradle-home" do
|
execute "add-gradle-home" do
|
||||||
user user
|
user user
|
||||||
command "echo \"export GRADLE_HOME=/opt/gradle\" >> /home/#{user}/.bashrc"
|
command "echo \"export GRADLE_HOME=/opt/gradle\" >> /home/#{user}/.bsenv"
|
||||||
not_if "grep GRADLE_HOME /home/#{user}/.bashrc"
|
not_if "grep GRADLE_HOME /home/#{user}/.bsenv"
|
||||||
end
|
end
|
||||||
execute "add-gradle-bin" do
|
execute "add-gradle-bin" do
|
||||||
user user
|
user user
|
||||||
command "echo \"export PATH=\\$PATH:/opt/gradle/bin\" >> /home/#{user}/.bashrc"
|
command "echo \"export PATH=\\$PATH:/opt/gradle/bin\" >> /home/#{user}/.bsenv"
|
||||||
not_if "grep gradle/bin /home/#{user}/.bashrc"
|
not_if "grep gradle/bin /home/#{user}/.bsenv"
|
||||||
|
end
|
||||||
|
execute "add-bsenv" do
|
||||||
|
user user
|
||||||
|
command "echo \". ./bsenv \" >> /home/#{user}/.bashrc"
|
||||||
|
not_if "grep bsenv /home/#{user}/.bashrc"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
|
|||||||
if force:
|
if force:
|
||||||
cmdline += ' --force --test'
|
cmdline += ' --force --test'
|
||||||
cmdline += ' -p ' + app['id'] + ' --vercode ' + thisbuild['vercode']
|
cmdline += ' -p ' + app['id'] + ' --vercode ' + thisbuild['vercode']
|
||||||
chan.exec_command(cmdline)
|
chan.exec_command('bash -c ". ~/.bsenv && ' + cmdline + '"')
|
||||||
output = ''
|
output = ''
|
||||||
error = ''
|
error = ''
|
||||||
while not chan.exit_status_ready():
|
while not chan.exit_status_ready():
|
||||||
|
Loading…
Reference in New Issue
Block a user