Skip to content

Commit

Permalink
update git version
Browse files Browse the repository at this point in the history
  • Loading branch information
hadirgax committed Aug 23, 2024
1 parent f0471a4 commit 5e439cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions setup_devenv/windows/setup-wsl2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
set -e # exit on error
set -x # debug trace mode

DISTRO="${DISTRO}"
FEATURE_DIR="${FEATURE_DIR}"
BACKUP_FILE="${BACKUP_FILE}"
FEATURE_DIR=${FEATURE_DIR}
BACKUP_FILE=${BACKUP_FILE}

function main {
# if wsl need to chenge nameserver in file /etc/resolv.conf then uncomment this:
Expand Down Expand Up @@ -83,7 +82,7 @@ function install_packages_and_tools {


function install_git {
GIT_VERSION="2.45.0" && \
GIT_VERSION="2.46.0" && \
echo;echo "Downloading source for ${GIT_VERSION}..." && \
curl -sL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz | tar -xzC /tmp 2>&1
echo;echo "Building..."
Expand Down
13 changes: 6 additions & 7 deletions setup_devenv/windows/wsl2.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Write-Output "`n>>>>> Installing $WSL_DISTRO Distribution... >>>>>"
$WSL_DISTRO="Ubuntu" # opts: Debian/Ubuntu
# wsl.exe --unregister $WSL_DISTRO
# wsl.exe --install -d $WSL_DISTRO
# wsl.exe -s $WSL_DISTRO
wsl.exe --unregister $WSL_DISTRO
wsl.exe --install -d $WSL_DISTRO
wsl.exe -s $WSL_DISTRO

# VARIABLES
$DEVOPS_DIR="${env:UserProfile}\workspace\devops"
Expand All @@ -24,10 +24,9 @@ $SETUP_WSL_PATH = $SETUP_WIN_PATH -replace '\\', '/' -replace 'C:', '/mnt/c'
$SETUP_WSL_PATH

# Write-Output "`n>>> Configuring a new WSL setup..."
wsl.exe -d $WSL_DISTRO -e bash -c "sudo chmod +x $SETUP_WSL_PATH && \
DISTRO=$WSL_DISTRO \
FEATURE_DIR=$FEATURE_WSL_DIR \
$SETUP_WSL_PATH main"
# wsl.exe -d $WSL_DISTRO -e bash -c "sed -i -e 's/\r$//' $SETUP_WSL_PATH"
wsl.exe -d $WSL_DISTRO -e bash -c "sudo chmod +x $SETUP_WSL_PATH"
wsl.exe -d $WSL_DISTRO -e bash -c "FEATURE_DIR=$FEATURE_WSL_DIR $SETUP_WSL_PATH main"
# BACKUP_FILE=$BACKUP_FILE \

Write-Output "`n>>>>> Done! >>>>>"

0 comments on commit 5e439cb

Please sign in to comment.