From 82cf0e63e0d4917563b37ef69543c88d9aad0881 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 2 Sep 2018 23:13:43 +0800 Subject: [PATCH 01/16] Update config.yml --- .circleci/config.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6123e12..994e2468 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,9 +3,6 @@ jobs: buildsource: docker: - image: patrick330602/fake_wsl_env - branches: - only: - - master steps: - checkout - run: @@ -21,9 +18,6 @@ jobs: builddevsource: docker: - image: patrick330602/fake_wsl_env - branches: - only: - - develop steps: - checkout - run: @@ -81,4 +75,4 @@ workflows: - buildsource - builddevsource - builddeb - - buildrpm \ No newline at end of file + - buildrpm From 5686d0676f721096bf81485e9a4f40195c937886 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 2 Sep 2018 23:17:46 +0800 Subject: [PATCH 02/16] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 994e2468..121a53fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: cd scripts sudo bash -x ./builder-deb.sh mkdir -p /tmp/pkgs - mv ../target/* /tmp/pkgs + sudo mv ../target/* /tmp/pkgs - store_artifacts: path: /tmp/pkgs buildrpm: @@ -65,7 +65,7 @@ jobs: cd scripts sudo bash -x ./builder-rpm.sh mkdir -p /tmp/pkgs - mv ../target/* /tmp/pkgs + sudo mv ../target/* /tmp/pkgs - store_artifacts: path: /tmp/pkgs workflows: From bbbb615e340bb006b7fdfc569fb496c0ed2281f8 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Mon, 3 Sep 2018 09:06:54 +0800 Subject: [PATCH 03/16] nah --- .circleci/config.yml | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 121a53fd..cb8167d2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: command: | cd scripts/ bash -x ./install-dev.sh - builddeb: + genpkg: machine: true steps: - checkout @@ -45,24 +45,6 @@ jobs: make cd scripts sudo bash -x ./builder-deb.sh - mkdir -p /tmp/pkgs - sudo mv ../target/* /tmp/pkgs - - store_artifacts: - path: /tmp/pkgs - buildrpm: - machine: true - steps: - - checkout - - run: - name: Install Pre-requisites - command: | - sudo apt-get update -qq - sudo apt-get install -qq build-essential rpm sudo - - run: - name: Build Package - command: | - make - cd scripts sudo bash -x ./builder-rpm.sh mkdir -p /tmp/pkgs sudo mv ../target/* /tmp/pkgs @@ -70,9 +52,17 @@ jobs: path: /tmp/pkgs workflows: version: 2 - build-and-generate: + build: jobs: - buildsource - builddevsource - - builddeb - - buildrpm + nightlybuild: + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - develop + jobs: + - genpkg From edbdea4df79997f36d2ae6925acfac59a96110a0 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Mon, 3 Sep 2018 09:41:48 +0800 Subject: [PATCH 04/16] nope --- scripts/builder-deb.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/builder-deb.sh b/scripts/builder-deb.sh index 3a4505ca..e3042946 100755 --- a/scripts/builder-deb.sh +++ b/scripts/builder-deb.sh @@ -2,6 +2,7 @@ BUILD_DIR=`mktemp --tmpdir --directory wslu-build-debian.XXXX` BUILD_DIR_WSLVIEW=`mktemp --tmpdir --directory wslview-build-debian.XXXX` BUILD_VER=`grep 'version=' ../src/wslu-header | cut -d'=' -f 2 | xargs` +DATE=`date +%Y%m%d%H%M%S` CURRENT_DIR=`pwd` mkdir $BUILD_DIR/{DEBIAN/,usr/,usr/bin/,usr/share/,usr/share/wslu/,usr/lib,usr/lib/mime,/usr/lib/mime/packages/} @@ -30,7 +31,7 @@ Depends: bc, wget, unzip, lsb-release Recommends: git Suggests: build-essential Priority: optional -Version: $BUILD_VER-1 +Version: $BUILD_VER-0~$DATE Description: A collection of utilities for Windows 10 Linux Subsystem This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. EOF @@ -49,7 +50,7 @@ find $BUILD_DIR/usr/lib/mime/packages/ -type f -exec chmod 644 {} \; [ -d $CURRENT_DIR/../target ] || mkdir $CURRENT_DIR/../target cd $CURRENT_DIR/../target/ -sudo dpkg -b $BUILD_DIR/ wslu-${BUILD_VER}.deb +sudo dpkg -b $BUILD_DIR/ wslu-${BUILD_VER}-${DATE}.deb rm -rf $BUILD_DIR cd $CURRENT_DIR From 5d011eafd455828307c0feeb6f27bac13f46f8c9 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Fri, 7 Sep 2018 22:34:00 +0800 Subject: [PATCH 05/16] remove dependency on lsb-release/hostname/uptime/uname --- scripts/builder-deb.sh | 2 +- scripts/builder-rpm.sh | 2 +- scripts/install-dev.sh | 9 +++------ scripts/install.sh | 9 +++------ src/wslfetch.sh | 4 ++-- src/wslsys.sh | 33 +++++++++++++++++++-------------- 6 files changed, 29 insertions(+), 30 deletions(-) diff --git a/scripts/builder-deb.sh b/scripts/builder-deb.sh index e3042946..6b2428b7 100755 --- a/scripts/builder-deb.sh +++ b/scripts/builder-deb.sh @@ -27,7 +27,7 @@ cat <>$BUILD_DIR/DEBIAN/control Package: wslu Architecture: all Maintainer: Patrick Wu -Depends: bc, wget, unzip, lsb-release +Depends: bc, wget, unzip Recommends: git Suggests: build-essential Priority: optional diff --git a/scripts/builder-rpm.sh b/scripts/builder-rpm.sh index 9ca8a7a5..98205f5b 100755 --- a/scripts/builder-rpm.sh +++ b/scripts/builder-rpm.sh @@ -30,7 +30,7 @@ Name: wslu Version: $BUILD_VER Release: 2 Source: wslu-$BUILD_VER.tar.gz -Requires: bc lsb-release wget unzip +Requires: bc wget unzip Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives URL: https://github.com/patrick330602/wslu/ diff --git a/scripts/install-dev.sh b/scripts/install-dev.sh index cef975dc..e61e21bc 100755 --- a/scripts/install-dev.sh +++ b/scripts/install-dev.sh @@ -32,13 +32,10 @@ echo "You are using: $distro" echo "Installing dependencies...." case "$distro" in 'ubuntu'|'debian'|'kali') - sudo apt install -y git build-essential bc wget unzip lsb-release make + sudo apt install -y git build-essential bc wget unzip make ;; - 'opensuse') - sudo zypper -n install git bc lsb-release hostname wget unzip make - ;; - 'sles') - sudo zypper -n install git bc lsb-release wget unzip make + 'opensuse'|'sles') + sudo zypper -n install git bc wget unzip make ;; esac if [[ ! -f /etc/fake-wsl-release ]]; then diff --git a/scripts/install.sh b/scripts/install.sh index 47d78147..48365ae8 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -32,13 +32,10 @@ echo "You are using: $distro" echo "Installing dependencies...." case "$distro" in 'ubuntu'|'debian'|'kali') - sudo apt install -y git build-essential bc wget unzip lsb-release make + sudo apt install -y git build-essential bc wget unzip make ;; - 'opensuse') - sudo zypper -n install git bc lsb-release hostname wget unzip make - ;; - 'sles') - sudo zypper -n install git bc lsb-release wget unzip make + 'opensuse'|'sles') + sudo zypper -n install git bc wget unzip make ;; esac if [[ ! -f /etc/fake-wsl-release ]]; then diff --git a/src/wslfetch.sh b/src/wslfetch.sh index 2a998796..ea670c28 100755 --- a/src/wslfetch.sh +++ b/src/wslfetch.sh @@ -1,10 +1,10 @@ -version=25 +version=26 is_line=0 is_splash=0 help_short="wslfetch (-h|-v|-s|-l|-c)" -hostname="$(hostname)" +hostname=$(&1 | sed -n 3p | sed -e "s/BuildBranch//" | sed -e 's/^[[:space:]]*//' | awk '{$1=""; sub(" ", " "); print}' | sed -e 's|\r||g'` build=`reg.exe query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "CurrentBuild" 2>&1 | egrep -o '([0-9]{5})'` full_build=`reg.exe query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "BuildLabEx" 2>&1 | sed -n 3p | sed -e "s/BuildLabEx//" | sed -e 's/^[[:space:]]*//' | awk '{$1=""; sub(" ", " "); print}' | sed -e 's|\r||g'` installdate=`reg.exe query "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v "InstallDate" | egrep -o "(0x|0X)[a-fA-F0-9]+" | xargs printf "%d\n" | bc | xargs -I '{}' date --date="@{}"` -release="$(lsb_release -ds | sed -e 's/"//g')" -kernel="$(uname -sr)" +release="$(cat /etc/os-release | grep "PRETTY_NAME=" | sed -e 's/PRETTY_NAME=//g' -e 's/"//g')" +kernel="$( Date: Sun, 16 Sep 2018 13:18:05 +0800 Subject: [PATCH 06/16] new incomplete structure --- extras/debian/control | 0 extras/debian/postinst | 3 +++ extras/debian/prerm | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 extras/debian/control create mode 100755 extras/debian/postinst create mode 100755 extras/debian/prerm diff --git a/extras/debian/control b/extras/debian/control new file mode 100644 index 00000000..e69de29b diff --git a/extras/debian/postinst b/extras/debian/postinst new file mode 100755 index 00000000..1a7f45c0 --- /dev/null +++ b/extras/debian/postinst @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 1 +update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 1 diff --git a/extras/debian/prerm b/extras/debian/prerm new file mode 100755 index 00000000..b76efa42 --- /dev/null +++ b/extras/debian/prerm @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +update-alternatives --remove x-www-browser /usr/bin/wslview +update-alternatives --remove www-browser /usr/bin/wslview From 977d5448c38e5ca8b73a310a59d80f19caba7eb7 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Mon, 17 Sep 2018 17:59:18 +0800 Subject: [PATCH 07/16] new build system for deb --- .circleci/config.yml | 2 +- extras/debian/changelog | 8 +++++ extras/debian/compat | 1 + extras/debian/control | 12 +++++++ extras/debian/copyright | 22 ++++++++++++ extras/debian/install | 3 ++ extras/debian/rules | 16 +++++++++ scripts/builder-deb.sh | 80 +++++++++++++++++------------------------ 8 files changed, 95 insertions(+), 49 deletions(-) create mode 100644 extras/debian/changelog create mode 100644 extras/debian/compat create mode 100644 extras/debian/copyright create mode 100644 extras/debian/install create mode 100644 extras/debian/rules diff --git a/.circleci/config.yml b/.circleci/config.yml index a7736281..cb8167d2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ workflows: build: jobs: - buildsource - - builddevsoure + - builddevsource nightlybuild: triggers: - schedule: diff --git a/extras/debian/changelog b/extras/debian/changelog new file mode 100644 index 00000000..662d8c03 --- /dev/null +++ b/extras/debian/changelog @@ -0,0 +1,8 @@ +wslu (1.7-0) stable; urgency=low + + * wslview out of experimental stage. + * Fix issues when running on top of Powershell Core 6. + * install scripts further update. + + -- Patrick Wu Sun, 02 Sep 2018 12:00:00 +0800 + diff --git a/extras/debian/compat b/extras/debian/compat new file mode 100644 index 00000000..f599e28b --- /dev/null +++ b/extras/debian/compat @@ -0,0 +1 @@ +10 diff --git a/extras/debian/control b/extras/debian/control index e69de29b..b72a5f71 100644 --- a/extras/debian/control +++ b/extras/debian/control @@ -0,0 +1,12 @@ +Source: wslu +Section: utils +Maintainer: Patrick Wu +Standards-Version: VERSIONPLACEHOLDER-0~DATEPLACEHOLDER +Priority: optional + +Package: wslu +Architecture: arm64 amd64 +Depends: bc, wget +Recommends: git +Description: A collection of utilities for Windows 10 Linux Subsystem + This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. diff --git a/extras/debian/copyright b/extras/debian/copyright new file mode 100644 index 00000000..fc3f981b --- /dev/null +++ b/extras/debian/copyright @@ -0,0 +1,22 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: wslu +Upstream-Contact: Patrick Wu +Source: https://github.com/wslutilities/wslu + +Files: * +Copyright: 2017-2018 Patrick Wu +License: GPL-3+ + +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/extras/debian/install b/extras/debian/install new file mode 100644 index 00000000..e9790846 --- /dev/null +++ b/extras/debian/install @@ -0,0 +1,3 @@ +src/wsl* /usr/bin +src/etc/* usr/share/wslu +src/mime/* usr/lib/mime/packages diff --git a/extras/debian/rules b/extras/debian/rules new file mode 100644 index 00000000..0c618c29 --- /dev/null +++ b/extras/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +# see FEATURE AREAS in dpkg-buildflags(1) + #export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + dh $@ diff --git a/scripts/builder-deb.sh b/scripts/builder-deb.sh index 6b2428b7..ed4a833f 100755 --- a/scripts/builder-deb.sh +++ b/scripts/builder-deb.sh @@ -1,56 +1,40 @@ #!/usr/bin/env bash BUILD_DIR=`mktemp --tmpdir --directory wslu-build-debian.XXXX` -BUILD_DIR_WSLVIEW=`mktemp --tmpdir --directory wslview-build-debian.XXXX` BUILD_VER=`grep 'version=' ../src/wslu-header | cut -d'=' -f 2 | xargs` DATE=`date +%Y%m%d%H%M%S` CURRENT_DIR=`pwd` -mkdir $BUILD_DIR/{DEBIAN/,usr/,usr/bin/,usr/share/,usr/share/wslu/,usr/lib,usr/lib/mime,/usr/lib/mime/packages/} - -touch $BUILD_DIR/DEBIAN/{postinst,prerm,control} - -chmod 755 $BUILD_DIR/DEBIAN/{postinst,prerm} - -cat <>$BUILD_DIR/DEBIAN/postinst -#!/usr/bin/env bash -update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 1 -update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 1 -EOF - -cat <>$BUILD_DIR/DEBIAN/prerm -#!/usr/bin/env bash -update-alternatives --remove x-www-browser /usr/bin/wslview -update-alternatives --remove www-browser /usr/bin/wslview -EOF - -cat <>$BUILD_DIR/DEBIAN/control -Package: wslu -Architecture: all -Maintainer: Patrick Wu -Depends: bc, wget, unzip -Recommends: git -Suggests: build-essential -Priority: optional -Version: $BUILD_VER-0~$DATE -Description: A collection of utilities for Windows 10 Linux Subsystem - This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. -EOF - -cp ../out/wsl* $BUILD_DIR/usr/bin/ -cp ../src/etc/* $BUILD_DIR/usr/share/wslu/ -cp ../src/mime/* $BUILD_DIR/usr/lib/mime/packages/ - -cd $BUILD_DIR -find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums - -find $BUILD_DIR -type d -exec chmod 0755 {} \; -find $BUILD_DIR/usr/ -type f -exec chmod 0555 {} \; -find $BUILD_DIR/usr/lib/mime/packages/ -type f -exec chmod 644 {} \; - -[ -d $CURRENT_DIR/../target ] || mkdir $CURRENT_DIR/../target -cd $CURRENT_DIR/../target/ - -sudo dpkg -b $BUILD_DIR/ wslu-${BUILD_VER}-${DATE}.deb - +# Creating folders +mkdir -p $BUILD_DIR/wslu-$BUILD_VER/{debian,debian/source,src,src/etc,src/mime} + +# Build wslu +cd $CURRENT_DIR/../ +make + +# copy files to build folder +cp out/* $BUILD_DIR/wslu-$BUILD_VER/src/ +cp src/etc/* $BUILD_DIR/wslu-$BUILD_VER/src/etc/ +cp src/mime/* $BUILD_DIR/wslu-$BUILD_VER/src/mime/ +cp extras/debian/* $BUILD_DIR/wslu-$BUILD_VER/debian + +# modifying the files +sed -i s/VERSIONPLACEHOLDER/$BUILD_VER/g $BUILD_DIR/wslu-$BUILD_VER/debian/control +sed -i s/DATEPLACEHOLDER/$DATE/g $BUILD_DIR/wslu-$BUILD_VER/debian/control +chmod 755 $BUILD_DIR/wslu-$BUILD_VER/debian/{postinst,prerm,rules} + +# Build packages +cd $BUILD_DIR/wslu-$BUILD_VER/ +dpkg-buildpackage -rsudo -us -uc + +# Move built packages +[ -d $CURRENT_DIR/../target/debian ] || mkdir -p $CURRENT_DIR/../target/debian +cd $CURRENT_DIR/../target/debian +cp -r $BUILD_DIR/*.dsc . +cp -r $BUILD_DIR/*.deb . +cp -r $BUILD_DIR/*.tar.gz . +cp -r $BUILD_DIR/*.buildinfo . +cp -r $BUILD_DIR/*.changes . + +# CLeanup everything rm -rf $BUILD_DIR cd $CURRENT_DIR From 1be8101f1fdba4ce3d93b56306cbe16221d54cc5 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sat, 22 Sep 2018 21:42:09 +0800 Subject: [PATCH 08/16] g ca add wlinux header --- src/wslu-header | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wslu-header b/src/wslu-header index fd024c24..2cb069ca 100755 --- a/src/wslu-header +++ b/src/wslu-header @@ -53,7 +53,9 @@ help_short="wslu (-h|-v|-s)" ## basic distro detection distro="$(cat /etc/os-release | head -n1 | sed -e 's/NAME="//g')" -if [[ "$distro" == Ubuntu* ]]; then +if [[ "$distro" == *WLinux* ]]; then + distro=wlinux +elif [[ "$distro" == Ubuntu* ]]; then distro="ubuntu" elif [[ "$distro" = *Debian* ]]; then distro="debian" From 0bf3fb1078e26ded55d11d6e2b9e2383d505c405 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sat, 22 Sep 2018 22:07:05 +0800 Subject: [PATCH 09/16] change code so that dev version can be installed seperately --- scripts/install-dev.sh | 31 ++++++++++++++++--------------- scripts/install.sh | 4 ++-- scripts/uninstall.sh | 14 +++++++------- src/wslsys.sh | 2 +- src/wslu-header | 8 ++++++-- src/wslusc.sh | 12 ++++++++---- 6 files changed, 40 insertions(+), 31 deletions(-) diff --git a/scripts/install-dev.sh b/scripts/install-dev.sh index e61e21bc..35e9d67e 100755 --- a/scripts/install-dev.sh +++ b/scripts/install-dev.sh @@ -9,13 +9,14 @@ elif [[ ! -f /proc/sys/fs/binfmt_misc/WSLInterop ]]; then fi cat << EOF -WSLU ---------------- -Windows 10 Linux Subsystem Utilities +wslu installation for developers +--------------------------------- EOF distro="$(cat /etc/os-release | head -n1 | sed -e 's/NAME="//g')" -if [[ "$distro" == Ubuntu* ]]; then +if [[ "$distro" == *WLinux* ]]; then + distro="wlinux" +elif [[ "$distro" == Ubuntu* ]]; then distro="ubuntu" elif [[ "$distro" == *Debian* ]]; then distro="debian" @@ -31,7 +32,7 @@ echo "You are using: $distro" echo "Installing dependencies...." case "$distro" in - 'ubuntu'|'debian'|'kali') + 'ubuntu'|'debian'|'kali'|'wlinux') sudo apt install -y git build-essential bc wget unzip make ;; 'opensuse'|'sles') @@ -110,22 +111,22 @@ PATH=$(getconf PATH) for f in out/wsl*; do bname="$(basename $f)" - sudo ln -s $CURRENT_PATH/$f /usr/bin/$bname; - echo "exec $f linked to /usr/bin/$bname"; + sudo ln -s $CURRENT_PATH/$f /usr/bin/$bname-dev; + echo "exec $f linked to /usr/bin/$bname-dev"; done -sudo cp $CURRENT_PATH/src/mime/* /usr/lib/mime/packages/ -[ -d /usr/share/wslu ] || sudo mkdir /usr/share/wslu -sudo cp $CURRENT_PATH/src/etc/* /usr/share/wslu +sudo cp $CURRENT_PATH/src/mime/wslview /usr/lib/mime/packages/wslview-dev +sudo sed 's/wslview/wslview-dev/g' /usr/lib/mime/packages/wslview-dev +echo "mime file copied" +[ -d /usr/share/wslu-dev ] || sudo mkdir /usr/share/wslu-dev +sudo cp $CURRENT_PATH/src/etc/* /usr/share/wslu-dev sudo update-mime -sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 1 -sudo update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 1 +sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview-dev 10 +sudo update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview-dev 10 cat < Date: Sat, 22 Sep 2018 22:37:06 +0800 Subject: [PATCH 10/16] wslu no longer providing source code installation --- CONTRIBUTING.md | 4 +- README.md | 14 ++--- scripts/install-dev.sh | 132 ----------------------------------------- scripts/install.sh | 58 ++++++++++++++---- scripts/uninstall.sh | 14 ++--- src/wslfetch.sh | 2 +- src/wslsys.sh | 2 +- src/wslu-header | 8 ++- src/wslusc.sh | 2 +- 9 files changed, 70 insertions(+), 166 deletions(-) delete mode 100755 scripts/install-dev.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 807e894a..424dc8ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ running the following to get started: ```bash -curl -o- https://github.com/raw/wslutilities/wslu/develop/scripts/install-dev.sh | bash +curl -o- https://github.com/raw/wslutilities/wslu/develop/scripts/install.sh | bash ``` ## Build Structure @@ -45,4 +45,4 @@ cd script sudo ./builder-rpm.sh ``` -It is suggested to do such action in Ubuntu 14.04 LTS or its corresponding environment. \ No newline at end of file +It is suggested to do such action in Ubuntu 14.04 LTS or its corresponding environment. diff --git a/README.md b/README.md index cb99e3a9..6b4bd386 100755 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ This is a collection of utilities for Windows 10 Linux Subsystem, such as enabli - SUSE Linux Enterprise Server(SLES) - Debian GNU/Linux - Kali Linux +- WLinux Legacy Ubuntu is no longer supporting. @@ -42,15 +43,17 @@ This is a fake WSL browser that can help you open link in default Windows browse ## Installation -Detailed installation is in Wiki/Installation. +### For WLinux + +Preinstalled in WLinux. ### For Ubuntu/Debian/Kali Linux Run following commands: ```bash -sudo apt install lsb-release apt-transport-https +sudo apt install apt-transport-https wget -O - https://api.patrickwu.ml/public.key | sudo apt-key add - -echo "deb https://apt.patrickwu.ml/ `lsb_release -c -s` main" | sudo tee -a /etc/apt/sources.list +echo "deb https://apt.patrickwu.ml/ stable main" | sudo tee -a /etc/apt/sources.list sudo apt update sudo apt install wslu ``` @@ -67,11 +70,6 @@ sudo zypper in wslu Or you can download the .rpm package from release and install it using `sudo rpm -ivh "wslu*"`. -### Surce Code - -To install, just run the following command in the bash prompt: -`curl -o- https://github.com/raw/patrick330602/wslu/master/extras/scripts/install.sh | bash` - ## Contribution Check [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/scripts/install-dev.sh b/scripts/install-dev.sh deleted file mode 100755 index 35e9d67e..00000000 --- a/scripts/install-dev.sh +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env bash -ORI_PATH="$(pwd)" - -if [[ -f /etc/fake-wsl-release ]]; then - echo "You are using fake WSL Environment. This is for building and testing only." -elif [[ ! -f /proc/sys/fs/binfmt_misc/WSLInterop ]]; then - echo "Your distro do not support WSL Interopability. Installation Aborted." - exit 1 -fi - -cat << EOF -wslu installation for developers ---------------------------------- -EOF - -distro="$(cat /etc/os-release | head -n1 | sed -e 's/NAME="//g')" -if [[ "$distro" == *WLinux* ]]; then - distro="wlinux" -elif [[ "$distro" == Ubuntu* ]]; then - distro="ubuntu" -elif [[ "$distro" == *Debian* ]]; then - distro="debian" -elif [[ "$distro" == *Kali* ]]; then - distro="kali" -elif [[ "$distro" == openSUSE* ]]; then - distro="opensuse" -elif [[ "$distro" == SLES* ]]; then - distro="sles" -fi - -echo "You are using: $distro" - -echo "Installing dependencies...." -case "$distro" in - 'ubuntu'|'debian'|'kali'|'wlinux') - sudo apt install -y git build-essential bc wget unzip make - ;; - 'opensuse'|'sles') - sudo zypper -n install git bc wget unzip make - ;; -esac -if [[ ! -f /etc/fake-wsl-release ]]; then - echo -e "\nWSL Interopability\n*********************" - cat /proc/sys/fs/binfmt_misc/WSLInterop - echo "" -fi - -echo -e "\ntesting powershell.exe..." -powershell.exe -NoProfile -NonInteractive -Command Get-History -if [[ $? -eq 0 ]]; then - echo "powershell.exe can be invoked." -else - echo "powershell.exe failed to launch." - exit 1 -fi -ppep="`powershell.exe Get-ExecutionPolicy 2>&1 | tail -n1 | sed 's/\r$//'`" -echo -e "Powershell Execution Policy: $ppep" -if [[ "$ppep" = "Restricted" ]]; then - cat << EOF -*************************************** - WARNING -*************************************** -The execution policy for powershell.exe -is set to Restricted. You should set P- -owershell Execution Policy to Unrestri- -cted with a Powershell Prompt with Adm- -inistrator right: - Set-ExecutionPolicy Unrestricted -Due to the limitation, it is not possi- -ble to invoke this command from Bash P- -rompt. -EOF -fi - -echo -e "\ntesting cmd.exe..." -cmd.exe /c ver -if [[ $? -eq 0 ]]; then - echo "cmd.exe can be invoked." -else - echo "cmd.exe failed to launch." - exit 1 -fi - -echo -e "\ntesting reg.exe..." -reg.exe /? -if [[ $? -eq 0 ]]; then - echo "reg.exe can be invoked." -else - echo "reg.exe failed to launch." - exit 1 -fi - -if [ `pwd | grep wslu` ]; then - cd ../ - CURRENT_PATH="$(pwd)" -else - git clone https://github.com/patrick330602/wslu.git - cd wslu - git checkout develop - CURRENT_PATH="$(pwd)" -fi - -make -chmod +x $CURRENT_PATH/out/* - -PATH="$CURRENT_PATH/src:$CURRENT_PATH/out:$PATH" -git submodule init -git submodule update -extras/bats/libexec/bats tests/header.bats tests/wslsys.bats tests/wslusc.bats tests/wslupath.bats tests/wslfetch.bats -PATH=$(getconf PATH) - -for f in out/wsl*; do - bname="$(basename $f)" - sudo ln -s $CURRENT_PATH/$f /usr/bin/$bname-dev; - echo "exec $f linked to /usr/bin/$bname-dev"; -done - -sudo cp $CURRENT_PATH/src/mime/wslview /usr/lib/mime/packages/wslview-dev -sudo sed 's/wslview/wslview-dev/g' /usr/lib/mime/packages/wslview-dev -echo "mime file copied" -[ -d /usr/share/wslu-dev ] || sudo mkdir /usr/share/wslu-dev -sudo cp $CURRENT_PATH/src/etc/* /usr/share/wslu-dev - -sudo update-mime -sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview-dev 10 -sudo update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview-dev 10 - -cat <&1 | sed -n 3p | sed -e "s/BuildBranch//" | sed -e 's/^[[:space:]]*//' | awk '{$1=""; sub(" ", " "); print}' | sed -e 's|\r||g'` diff --git a/src/wslu-header b/src/wslu-header index 8fb92dbf..c58a0f21 100755 --- a/src/wslu-header +++ b/src/wslu-header @@ -18,7 +18,7 @@ # along with this program. If not, see . # global config -wslu_version=1.7 +wslu_version=1.8 ## color black=`echo -e '\e[30m'` @@ -85,3 +85,9 @@ Usage: $2 For more help for `basename "$1"`, visit the following site: https://github.com/patrick330602/wslu/wiki/`basename "$1"`" } + +execsys="wslsys" +if [[ isdev $0 ]]; then + execsys="wslsys-dev" +fi + diff --git a/src/wslusc.sh b/src/wslusc.sh index 39b9b523..250a7ddd 100755 --- a/src/wslusc.sh +++ b/src/wslusc.sh @@ -5,7 +5,7 @@ iconpath="`wslupath -d -H`\\wslu\\wsl.ico" is_icon=0 is_gui=0 -help_short="wslusc (-i|-g|-h|-v) ..NAME..." +help_short="$0 (-i|-g|-h|-v) ..NAME..." while [ $1 ]; do case $1 in From 62bd545726e786d0241cafa6024c2e9cb1cbe91b Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sat, 22 Sep 2018 22:45:13 +0800 Subject: [PATCH 11/16] fix some bugs --- scripts/install.sh | 4 +++- src/wslfetch.sh | 2 +- src/wslu-header | 17 ----------------- src/wslusc.sh | 3 --- tests/wslusc.bats | 4 ++-- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 33fe9617..ae940431 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -33,9 +33,11 @@ echo "You are using: $distro" echo "Installing dependencies...." case "$distro" in 'ubuntu'|'debian'|'kali'|'wlinux') + sudo apt purge wslu sudo apt install -y git build-essential bc wget unzip make ;; 'opensuse'|'sles') + sudo apt purge wslu sudo zypper -n install git bc wget unzip make ;; esac @@ -122,7 +124,7 @@ sudo cp $CURRENT_PATH/src/etc/* /usr/share/wslu sudo update-mime sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 10 -sudo update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview- 10 +sudo update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 10 cat < Date: Sat, 22 Sep 2018 22:48:12 +0800 Subject: [PATCH 12/16] rua --- src/wslusc.sh | 4 ++-- tests/wslusc.bats | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wslusc.sh b/src/wslusc.sh index c0556cdd..0dcde24f 100755 --- a/src/wslusc.sh +++ b/src/wslusc.sh @@ -1,11 +1,11 @@ -version="10" +version="14" cname="" iconpath="`wslupath -d -H`\\wslu\\wsl.ico" is_icon=0 is_gui=0 -help_short="$0 (-i|-g|-h|-v) ..NAME..." +help_short="wslusc (-i|-g|-h|-v) ...NAME..." while [ $1 ]; do case $1 in diff --git a/tests/wslusc.bats b/tests/wslusc.bats index a96e81e5..a83a3762 100755 --- a/tests/wslusc.bats +++ b/tests/wslusc.bats @@ -17,7 +17,7 @@ teardown() { @test "wslusc - Help" { run out/wslusc --help [ "${lines[0]}" = "wslusc - Component of Windows 10 Linux Subsystem Utility" ] - [ "${lines[1]}" = "Usage: wslusc (-i|-g|-h|-v) ..NAME..." ] + [ "${lines[1]}" = "Usage: wslusc (-i|-g|-h|-v) ...NAME..." ] [ "${lines[2]}" = "For more help for wslusc, visit the following site:" ] [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslusc" ] } @@ -25,7 +25,7 @@ teardown() { @test "wslusc - Help - Alt." { run out/wslusc -h [ "${lines[0]}" = "wslusc - Component of Windows 10 Linux Subsystem Utility" ] - [ "${lines[1]}" = "Usage: wslusc (-i|-g|-h|-v) ..NAME..." ] + [ "${lines[1]}" = "Usage: wslusc (-i|-g|-h|-v) ...NAME..." ] [ "${lines[2]}" = "For more help for wslusc, visit the following site:" ] [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslusc" ] } From 6614230f02d64fdc1923c2ef1501dc0a62155257 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sat, 22 Sep 2018 22:57:19 +0800 Subject: [PATCH 13/16] change CI and Tests --- .circleci/config.yml | 19 ++----------------- src/wslu-header | 7 +++---- src/wslview.sh | 2 +- tests/wslfetch.bats | 4 ---- tests/wslsys.bats | 2 -- tests/wslupath.bats | 4 ---- tests/wslusc.bats | 6 +----- tests/wslview..bats | 19 +++++++++++++++++++ 8 files changed, 26 insertions(+), 37 deletions(-) create mode 100644 tests/wslview..bats diff --git a/.circleci/config.yml b/.circleci/config.yml index cb8167d2..65a56dda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,21 +15,6 @@ jobs: command: | cd scripts/ bash -x ./install.sh - builddevsource: - docker: - - image: patrick330602/fake_wsl_env - steps: - - checkout - - run: - name: Install Pre-requisites - command: | - apt-get update -qq - apt-get install -qq apt-utils mime-support sudo - - run: - name: Install via Source Code - command: | - cd scripts/ - bash -x ./install-dev.sh genpkg: machine: true steps: @@ -38,7 +23,7 @@ jobs: name: Install Pre-requisites command: | sudo apt-get update -qq - sudo apt-get install -qq build-essential rpm sudo + sudo apt-get install -qq build-essential rpm sudo dh-make devscripts - run: name: Build Package command: | @@ -55,7 +40,7 @@ workflows: build: jobs: - buildsource - - builddevsource + - genpkg nightlybuild: triggers: - schedule: diff --git a/src/wslu-header b/src/wslu-header index df2991e3..24d59232 100755 --- a/src/wslu-header +++ b/src/wslu-header @@ -68,9 +68,8 @@ fi function help { echo -e "`basename "$1"` - Component of Windows 10 Linux Subsystem Utility -Usage: $2 - -For more help for `basename "$1"`, visit the following site: -https://github.com/patrick330602/wslu/wiki/`basename "$1"`" +Usage: $2" } +no_longer_use_but_might_use_it_in_the_future="For more help for `basename "$1"`, visit the following site: https://github.com/patrick330602/wslu/wiki/`basename "$1"`" + diff --git a/src/wslview.sh b/src/wslview.sh index b79aa7d2..e0db5970 100755 --- a/src/wslview.sh +++ b/src/wslview.sh @@ -2,7 +2,7 @@ version="02" lname="" -help_short="wslview (-u|-r|-h|-v) ..LINK..." +help_short="wslview (-u|-r|-h|-v) ...LINK..." for args; do case $args in diff --git a/tests/wslfetch.bats b/tests/wslfetch.bats index 2e7a8d03..5477ad96 100755 --- a/tests/wslfetch.bats +++ b/tests/wslfetch.bats @@ -10,14 +10,10 @@ run out/wslfetch --help [ "${lines[0]}" = "wslfetch - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslfetch (-h|-v|-s|-l|-c)" ] - [ "${lines[2]}" = "For more help for wslfetch, visit the following site:" ] - [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslfetch" ] } @test "wslfetch - Help - Alt." { run out/wslfetch -h [ "${lines[0]}" = "wslfetch - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslfetch (-h|-v|-s|-l|-c)" ] - [ "${lines[2]}" = "For more help for wslfetch, visit the following site:" ] - [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslfetch" ] } diff --git a/tests/wslsys.bats b/tests/wslsys.bats index a2723413..5bf54bea 100755 --- a/tests/wslsys.bats +++ b/tests/wslsys.bats @@ -18,6 +18,4 @@ run out/wslsys -h [ "${lines[0]}" = "wslsys - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslsys (-h|-v|-S|-U|-b|-B|-fB|-R|-K|-P) -s" ] - [ "${lines[2]}" = "For more help for wslsys, visit the following site:" ] - [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslsys" ] } diff --git a/tests/wslupath.bats b/tests/wslupath.bats index 83dac257..65c8da1b 100755 --- a/tests/wslupath.bats +++ b/tests/wslupath.bats @@ -13,8 +13,6 @@ [ "${lines[0]}" = "wslupath - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslupath (-dOr) [-D|-A|-T|-S|-W|-s|-su|-H|-P|...NAME...]" ] [ "${lines[2]}" = "wslupath (-h|-v|-R)" ] - [ "${lines[3]}" = "For more help for wslupath, visit the following site:" ] - [ "${lines[4]}" = "https://github.com/patrick330602/wslu/wiki/wslupath" ] } @test "wslupath - Help - Alt." { @@ -22,8 +20,6 @@ [ "${lines[0]}" = "wslupath - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslupath (-dOr) [-D|-A|-T|-S|-W|-s|-su|-H|-P|...NAME...]" ] [ "${lines[2]}" = "wslupath (-h|-v|-R)" ] - [ "${lines[3]}" = "For more help for wslupath, visit the following site:" ] - [ "${lines[4]}" = "https://github.com/patrick330602/wslu/wiki/wslupath" ] } @test "wslupath - Available Registery" { run out/wslupath --avail-reg diff --git a/tests/wslusc.bats b/tests/wslusc.bats index a83a3762..683adc58 100755 --- a/tests/wslusc.bats +++ b/tests/wslusc.bats @@ -18,16 +18,12 @@ teardown() { run out/wslusc --help [ "${lines[0]}" = "wslusc - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslusc (-i|-g|-h|-v) ...NAME..." ] - [ "${lines[2]}" = "For more help for wslusc, visit the following site:" ] - [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslusc" ] } @test "wslusc - Help - Alt." { run out/wslusc -h [ "${lines[0]}" = "wslusc - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslusc (-i|-g|-h|-v) ...NAME..." ] - [ "${lines[2]}" = "For more help for wslusc, visit the following site:" ] - [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslusc" ] } @test "wslusc - without GUI" { @@ -36,6 +32,6 @@ teardown() { } @test "wslusc - with GUI" { - run out/wslusc -x test2 + run out/wslusc -g test2 [ -f "`out/wslupath -D`/test2.lnk" ] } diff --git a/tests/wslview..bats b/tests/wslview..bats new file mode 100644 index 00000000..f8bedecd --- /dev/null +++ b/tests/wslview..bats @@ -0,0 +1,19 @@ +#!/usr/bin/env bats + +#wslview testing +@test "wslview - No parameter" { + run out/wslview + [ "$status" -eq 21 ] +} + +@test "wslview - Help" { + run out/wslview --help + [ "${lines[0]}" = "wslsys - Component of Windows 10 Linux Subsystem Utility" ] + [ "${lines[1]}" = "Usage: wslview (-u|-r|-h|-v) ...LINK..." ] +} + +@test "wslview - Help - Alt." { + run out/wslview -h + [ "${lines[0]}" = "wslsys - Component of Windows 10 Linux Subsystem Utility" ] + [ "${lines[1]}" = "Usage: wslview (-u|-r|-h|-v) ...LINK..." ] +} From 710c898b39e274c9d16652c2cc2e9e1e5deaf09f Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sat, 22 Sep 2018 23:11:30 +0800 Subject: [PATCH 14/16] further fixes --- Makefile | 2 +- scripts/install.sh | 6 +++--- src/wslu-header | 4 ++-- tests/wslsys.bats | 2 -- tests/{wslview..bats => wslview.bats} | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) rename tests/{wslview..bats => wslview.bats} (68%) diff --git a/Makefile b/Makefile index bda45dd0..845fc9f3 100755 --- a/Makefile +++ b/Makefile @@ -17,4 +17,4 @@ clean: test: PATH="$$CURRENT_PATH/src:$$CURRENT_PATH/out:$$PATH" - extras/bats/libexec/bats tests/header.bats tests/wslsys.bats tests/wslusc.bats tests/wslupath.bats tests/wslfetch.bats + extras/bats/libexec/bats tests/header.bats tests/wslsys.bats tests/wslusc.bats tests/wslupath.bats tests/wslfetch.bats tests/wslview.bats diff --git a/scripts/install.sh b/scripts/install.sh index ae940431..c32100fa 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -102,13 +102,13 @@ else CURRENT_PATH="$(pwd)" fi -sudo make -sudo chmod +x $CURRENT_PATH/out/* +make +chmod +x $CURRENT_PATH/out/* PATH="$CURRENT_PATH/src:$CURRENT_PATH/out:$PATH" git submodule init git submodule update -extras/bats/libexec/bats tests/header.bats tests/wslsys.bats tests/wslusc.bats tests/wslupath.bats tests/wslfetch.bats +extras/bats/libexec/bats tests/header.bats tests/wslsys.bats tests/wslusc.bats tests/wslupath.bats tests/wslfetch.bats tests/wslview.bats PATH=$(getconf PATH) for f in out/wsl*; do diff --git a/src/wslu-header b/src/wslu-header index 24d59232..b20142e5 100755 --- a/src/wslu-header +++ b/src/wslu-header @@ -49,7 +49,7 @@ warn="${orange}[warn]${reset}" debug="${cyan}[debug]${reset}" ## basic distro detection -distro="$(cat /etc/os-release | head -n1 | sed -e 's/NAME="//g')" +distro="$(cat /etc/os-release | head -n1 | sed -e 's/NAME=\"//g')" if [[ "$distro" == *WLinux* ]]; then distro=wlinux elif [[ "$distro" == Ubuntu* ]]; then @@ -71,5 +71,5 @@ function help Usage: $2" } -no_longer_use_but_might_use_it_in_the_future="For more help for `basename "$1"`, visit the following site: https://github.com/patrick330602/wslu/wiki/`basename "$1"`" +#no_longer_use_but_might_use_it_in_the_future="For more help for `basename "$1"`, visit the following site: https://github.com/patrick330602/wslu/wiki/`basename "$1"`" diff --git a/tests/wslsys.bats b/tests/wslsys.bats index 5bf54bea..5da05eb8 100755 --- a/tests/wslsys.bats +++ b/tests/wslsys.bats @@ -10,8 +10,6 @@ run out/wslsys --help [ "${lines[0]}" = "wslsys - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslsys (-h|-v|-S|-U|-b|-B|-fB|-R|-K|-P) -s" ] - [ "${lines[2]}" = "For more help for wslsys, visit the following site:" ] - [ "${lines[3]}" = "https://github.com/patrick330602/wslu/wiki/wslsys" ] } @test "wslsys - Help - Alt." { diff --git a/tests/wslview..bats b/tests/wslview.bats similarity index 68% rename from tests/wslview..bats rename to tests/wslview.bats index f8bedecd..4d1776db 100644 --- a/tests/wslview..bats +++ b/tests/wslview.bats @@ -8,12 +8,12 @@ @test "wslview - Help" { run out/wslview --help - [ "${lines[0]}" = "wslsys - Component of Windows 10 Linux Subsystem Utility" ] + [ "${lines[0]}" = "wslview - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslview (-u|-r|-h|-v) ...LINK..." ] } @test "wslview - Help - Alt." { run out/wslview -h - [ "${lines[0]}" = "wslsys - Component of Windows 10 Linux Subsystem Utility" ] + [ "${lines[0]}" = "wslview - Component of Windows 10 Linux Subsystem Utility" ] [ "${lines[1]}" = "Usage: wslview (-u|-r|-h|-v) ...LINK..." ] } From 74d8d142acaa567275c8c236752d5ca1bb068a58 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sat, 22 Sep 2018 23:56:23 +0800 Subject: [PATCH 15/16] wslu 1.8 --- CONTRIBUTING.md | 7 ++++++- README.md | 4 ++-- extras/debian/changelog | 8 ++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 424dc8ea..ba3c814e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,12 +13,17 @@ curl -o- https://github.com/raw/wslutilities/wslu/develop/scripts/ins ``` wslu |-src +| |-mime/wslview: mime file for wslview +| |-etc +| | |-wsl.ico: default icon for wslusc +| | \-runHidden.vbs: script for wslusc | |-wslu-header: Header file of all script | \-.sh: Components of script |-scripts: scripts used for building, installing and uninstalling |-tests: location for script tests \-extras - \-bats: testing utility + |-bats: testing utility + \-debian: stuff for ``` ## Build diff --git a/README.md b/README.md index 6b4bd386..1c4e4e65 100755 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fpatrick330602%2Fwslu.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fpatrick330602%2Fwslu?ref=badge_shield) [![Donate](https://badgen.net/badge/Donate/Paypal/purple)](https://www.paypal.me/callmepk/) -This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux GUI application shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update. +This is a collection of utilities for Windows 10 Linux Subsystem, such as converting WSL path to Windows path or creating your favorite linux GUI application shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update. **Currently supported Distro:** - Ubuntu @@ -20,7 +20,7 @@ This is a collection of utilities for Windows 10 Linux Subsystem, such as enabli - SUSE Linux Enterprise Server(SLES) - Debian GNU/Linux - Kali Linux -- WLinux +- **WLinux** Legacy Ubuntu is no longer supporting. diff --git a/extras/debian/changelog b/extras/debian/changelog index 662d8c03..fc458e3d 100644 --- a/extras/debian/changelog +++ b/extras/debian/changelog @@ -1,3 +1,11 @@ +wslu (1.8-0) stable; urgency=low + + * less dependent on lsb-release/hostname/uptime/uname. + * add support for WLinux. + * install and build scripts update. + + -- Patrick Wu Sun, 23 Sep 2018 12:00:00 +0800 + wslu (1.7-0) stable; urgency=low * wslview out of experimental stage. From 70256048951f032dce3bf74025a41e835d512086 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 23 Sep 2018 00:03:13 +0800 Subject: [PATCH 16/16] zypper issue --- scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index c32100fa..45c385a2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -37,7 +37,7 @@ case "$distro" in sudo apt install -y git build-essential bc wget unzip make ;; 'opensuse'|'sles') - sudo apt purge wslu + sudo zypper rm wslu sudo zypper -n install git bc wget unzip make ;; esac