Skip to content

Commit

Permalink
Change user's Downloads to user's tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jwokaty committed Nov 10, 2023
1 parent 2fcf24e commit c336ce8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
17 changes: 9 additions & 8 deletions saltstack/salt/common/mac.sls
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ create_{{ machine.user.name }}:
dscl . -passwd /Users/{{ machine.user.name }} {{ salt['environ.get']('BIOCBUILD_PASSWORD') }}
dscl . -append /Groups/admin GroupMembership {{ machine.user.name }}
cp -R /System/Library/User\ Template/English.lproj /Users/{{ machine.user.name }}
mkdir /Users/{{ machine.user.name }}/tmp
chown -R {{ machine.user.name }}:staff /Users/{{ machine.user.name }}
- unless:
- dscl . list /Users | egrep {{ user.name }}
Expand Down Expand Up @@ -102,13 +103,13 @@ git_clone_{{ repo.bbs.name }}_to_{{ machine.user.home }}/{{ machine.user.name }}
download_XQuartz:
cmd.run:
- name: curl -LO {{ machine.downloads.xquartz }}
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp

install_XQuartz:
cmd.run:
- name: |
installer -pkg {{ xquartz }} -target /
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- require:
- cmd: download_XQuartz

Expand Down Expand Up @@ -184,12 +185,12 @@ load_xvfb:
download_gfortran:
cmd.run:
- name: curl -LO {{ gfortran_download }}
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- runas: {{ machine.user.name }}

install_gfortran:
cmd.run:
- name: tar -xf {{ machine.user.home }}/{{ machine.user.name }}/Downloads/{{ gfortran }} -C /
- name: tar -xf {{ machine.user.home }}/{{ machine.user.name }}/tmp/{{ gfortran }} -C /
- require:
- cmd: download_gfortran

Expand Down Expand Up @@ -237,13 +238,13 @@ install_pip_pkgs:
download_mactex:
cmd.run:
- name: curl -LO {{ machine.downloads.mactex }}
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- runas: {{ machine.user.name }}

install_mactex:
cmd.run:
- name: installer -pkg MacTeX.pkg -target /
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- require:
- cmd: download_mactex

Expand All @@ -258,13 +259,13 @@ install_pandoc:
download_pandoc:
cmd.run:
- name: curl -LO {{ machine.downloads.intel.pandoc }}
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- user: {{ machine.user.name }}

install_pandoc:
cmd.run:
- name: installer -pkg {{ pandoc }} -target /
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- require:
- cmd: download_pandoc
{%- endif %}
Expand Down
8 changes: 4 additions & 4 deletions saltstack/salt/rlang/mac.sls
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ remove_old_r:
get_R_pkg:
cmd.run:
- name: curl -O {{ r.download }}
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- require:
- file: remove_old_r

install_R:
cmd.run:
- name: installer -pkg {{ downloaded_file }} -target /
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- require:
- cmd: get_R_pkg

Expand Down Expand Up @@ -126,13 +126,13 @@ symlink_previous_version:
download_minimum_supported_macossdk:
cmd.run:
- name: curl -LO https://mac.r-project.org/sdk/MacOSX11.3.sdk.tar.xz
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/Downloads
- cwd: {{ machine.user.home }}/{{ machine.user.name }}/tmp
- require:
- file: symlink_previous_version
untar_macossdk:
cmd.run:
- name: tar -xf {{ machine.user.home }}/{{ machine.user.name }}/Downloads/MacOSX11.3.sdk.tar.xz
- name: tar -xf {{ machine.user.home }}/{{ machine.user.name }}/tmp/MacOSX11.3.sdk.tar.xz
- cwd: /Library/Developer/CommandLineTools/SDKs
- user: root
- group: wheel
Expand Down

0 comments on commit c336ce8

Please sign in to comment.