Skip to content

Commit

Permalink
Merge pull request #76 from WhitewaterFoundry/development
Browse files Browse the repository at this point in the history
  • Loading branch information
crramirez authored Apr 8, 2020
2 parents 32f4517 + 2b3d3ee commit 7ad15a0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ jobs:
name: Install packageloud cli
command: gem install package_cloud
- run:
name: Push deb package
name: Push deb package buster
command: package_cloud push whitewaterfoundry/pengwin-base/debian/buster /tmp/pkgs/pengwin-base_0.1-*_all.deb
- run:
name: Push deb package bullseye
command: package_cloud push whitewaterfoundry/pengwin-base/debian/bullseye /tmp/pkgs/pengwin-base_0.1-*_all.deb
deploydevdeb:
docker:
- image: circleci/ruby:2.3-jessie
Expand All @@ -55,6 +58,9 @@ jobs:
- run:
name: Push deb package
command: package_cloud push whitewaterfoundry/pengwin-base-dev/debian/buster /tmp/pkgs/pengwin-base_0.1-*_all.deb
- run:
name: Push deb package
command: package_cloud push whitewaterfoundry/pengwin-base-dev/debian/bullseye /tmp/pkgs/pengwin-base_0.1-*_all.deb
workflows:
version: 2
testdebbuild:
Expand Down
6 changes: 5 additions & 1 deletion bin/switch2dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ fi

curl -s "https://packagecloud.io/install/repositories/whitewaterfoundry/pengwin-base${NEW}/script.deb.sh" | sudo env os=debian dist=buster bash
curl -s "https://packagecloud.io/install/repositories/whitewaterfoundry/pengwin-setup${NEW}/script.deb.sh" | sudo env os=debian dist=buster bash
curl -s "https://packagecloud.io/install/repositories/whitewaterfoundry/wslu${NEW}/script.deb.sh" | sudo env os=debian dist=bullseye bash

sudo sed -i "s\$/pengwin-setup${OLD}/\$/pengwin-setup${NEW}/\$g" /etc/apt/sources.list.d/whitewaterfoundry.list
sudo sed -i "s\$/pengwin-base${OLD}/\$/pengwin-base${NEW}/\$g" /etc/apt/sources.list.d/whitewaterfoundry.list
sudo sed -i "s\$/wslu${OLD}/\$/wslu${NEW}/\$g" /etc/apt/sources.list.d/whitewaterfoundry.list

sudo rm /etc/apt/sources.list.d/whitewaterfoundry_pengwin-*
sudo sed -i "s\$/wslu${NEW}/debian/ buster\$/wslu${NEW}/debian/ bullseye\$g" /etc/apt/sources.list.d/whitewaterfoundry.list

sudo rm /etc/apt/sources.list.d/whitewaterfoundry_*

sudo apt update
sudo apt upgrade
5 changes: 3 additions & 2 deletions os-release
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ VERSION="11 (bullseye)"
ID=debian
ID_LIKE=debian
HOME_URL="https://github.com/whitewaterfoundry/Pengwin"
SUPPORT_URL="https://github.com/whitewaterfoundry/Pengwin"
BUG_REPORT_URL="https://github.com/whitewaterfoundry/Pengwin"
SUPPORT_URL="https://github.com/WhitewaterFoundry/Pengwin/issues"
BUG_REPORT_URL="https://github.com/WhitewaterFoundry/Pengwin/issues"
VERSION_CODENAME=bullseye
PENGWIN_VERSION="20.04.0"
28 changes: 16 additions & 12 deletions profile.d/00-pengwin.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
# Only the default WSL user should run this script
if ! (id -Gn | grep -c "adm.*sudo\|sudo.*adm" >/dev/null); then
return
fi

# WSL2 Environment variable meaning:
# WSL2=0: WSL1
# WSL2=1: WSL2 (Type 1)
# WSL2=2: WSL2 (Type 2)
if [[ -n ${WSL_INTEROP} ]]; then
if [ -n "${WSL_INTEROP}" ]; then
# enable external x display for WSL 2

ipconfig_exec=$(wslpath "C:\\Windows\\System32\\ipconfig.exe")
if ( which ipconfig.exe &>/dev/null ); then
ipconfig_exec=$(which ipconfig.exe)
if (command -v ipconfig.exe &>/dev/null); then
ipconfig_exec=$(command -v ipconfig.exe)
fi

wsl2_d_tmp="$(eval "$ipconfig_exec 2> /dev/null" | grep -n -m 1 "Default Gateway.*: [0-9a-z]" | cut -d : -f 1)"

if [ -n "${wsl2_d_tmp}" ]; then

wsl2_d_tmp="$(eval "$ipconfig_exec" | sed $(expr $wsl2_d_tmp - 4)','$(expr $wsl2_d_tmp + 0)'!d' | grep IPv4 | cut -d : -f 2 | sed -e "s|\s||g" -e "s|\r||g")"
wsl2_d_tmp="$(eval "$ipconfig_exec" | sed "$(("$wsl2_d_tmp" - 4))"','"$(("$wsl2_d_tmp" + 0))"'!d' | grep IPv4 | cut -d : -f 2 | sed -e "s|\s||g" -e "s|\r||g")"
export DISPLAY=${wsl2_d_tmp}:0.0

# check if the type is changed
Expand All @@ -24,7 +29,7 @@ if [[ -n ${WSL_INTEROP} ]]; then
export WSL2=2

else
wsl2_d_tmp="$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}')"
wsl2_d_tmp="$(grep </etc/resolv.conf nameserver | awk '{print $2}')"
export DISPLAY=${wsl2_d_tmp}:0

# check if we have wsl.exe in path
Expand All @@ -49,10 +54,8 @@ else

fi



# enable external libgl if mesa is not installed
if ( which glxinfo > /dev/null 2>&1 ); then
if (command -v glxinfo >/dev/null 2>&1); then
unset LIBGL_ALWAYS_INDIRECT
sudo /usr/local/bin/libgl-change-checker 0
else
Expand All @@ -70,28 +73,29 @@ alias clear='clear -x'
alias ll='ls -al'

# Check if we have Windows Path
if ( which cmd.exe >/dev/null ); then
if (command -v cmd.exe >/dev/null); then

# Execute on user's shell first-run
if [ ! -f "${HOME}/.firstrun" ]; then
echo "Welcome to Pengwin. Type 'pengwin-setup' to run the setup tool. You will only see this message on the first run."
touch "${HOME}/.firstrun"
fi

if ( ! wslpath 'C:\' > /dev/null 2>&1 ); then
# shellcheck disable=SC1003
if (! wslpath 'C:\' >/dev/null 2>&1); then
alias wslpath=legacy_wslupath
fi

# Create a symbolic link to the windows home
wHomeWinPath=$(cmd-exe /c 'echo %HOMEDRIVE%%HOMEPATH%' | tr -d '\r')
# shellcheck disable=SC2155
export WIN_HOME=$(wslpath -u "${wHomeWinPath}")

win_home_lnk=${HOME}/winhome
if [ ! -e "${win_home_lnk}" ] ; then
if [ ! -e "${win_home_lnk}" ]; then
ln -s -f "${WIN_HOME}" "${win_home_lnk}"
fi

unset win_home_lnk

fi

4 changes: 2 additions & 2 deletions sources.list.d/whitewaterfoundry.list
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ deb https://packagecloud.io/whitewaterfoundry/pengwin-base/debian/ buster main
deb https://packagecloud.io/whitewaterfoundry/pengwin-setup/debian/ buster main
#deb-src https://packagecloud.io/whitewaterfoundry/pengwin-setup/debian/ buster main

deb https://packagecloud.io/whitewaterfoundry/wslu/debian/ buster main
#deb-src https://packagecloud.io/whitewaterfoundry/wslu/debian/ buster main
deb https://packagecloud.io/whitewaterfoundry/wslu/debian/ bullseye main
#deb-src https://packagecloud.io/whitewaterfoundry/wslu/debian/ bullseye main

0 comments on commit 7ad15a0

Please sign in to comment.