Skip to content

Commit

Permalink
fix: change the preset lua/user to lua/user_template (ayamir#986)
Browse files Browse the repository at this point in the history
* Change 'lua/user' to 'lua/user_template'

* Auto generate 'lua/user' in the install script
  • Loading branch information
popjdh authored and aaron.zhou committed Sep 8, 2023
1 parent 3e4eb59 commit 0534a49
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ Please make sure you have nvim v$REQUIRED_NVIM_VERSION_LEGACY installed at the v

safe_execute -WithCmd { Set-Location -Path "$env:CCDEST_DIR" }

safe_execute -WithCmd { Copy-Item -Path "$env:CCDEST_DIR\lua\user_template\" -Destination "$env:CCDEST_DIR\lua\user" -Recurse }

safe_execute -WithCmd { Set-Location -Path "$env:CCDEST_DIR\lua\user" }

if (-not $USE_SSH) {
info -Msg "Changing default fetching method to HTTPS..."
safe_execute -WithCmd {
Expand Down
4 changes: 4 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ fi

cd "${DEST_DIR}" || return

execute "cp" "-r" "${DEST_DIR}/lua/user_template/" "${DEST_DIR}/lua/user"

cd "${DEST_DIR}/lua/user" || return

if [[ "${USE_SSH}" -eq "0" ]]; then
info "Changing default fetching method to HTTPS..."
execute "perl" "-pi" "-e" "s/\[\"use_ssh\"\] \= true/\[\"use_ssh\"\] \= false/g" "${DEST_DIR}/lua/user/settings.lua"
Expand Down

0 comments on commit 0534a49

Please sign in to comment.