From f86d774fa1df0a8e6605f79aaf5f03dbc00d2950 Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Sun, 8 Nov 2020 09:56:04 -0500 Subject: [PATCH] Moved ~/.winapps to ~/.config (backwards compatible) --- README.md | 4 ++-- bin/winapps | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bd88be4..de3d331 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ To Do ## Installation ### Creating your WinApps configuration file -You will need to create a `~/.winapps` configuration file with the following information in it: +You will need to create a `~/.config/winapps/winapps.conf` configuration file with the following information in it: ``` bash RDP_USER="MyWindowsUser" RDP_PASS="MyWindowsPassword" @@ -95,7 +95,7 @@ Installation complete. ``` ### Option 2 - I already have an RDP server or VM -If you already have an RDP server or VM, using WinApps is very straight forward. Simply create your `~/.winapps` configuration file, and run: +If you already have an RDP server or VM, using WinApps is very straight forward. Simply create your `~/.config/winapps/winapps.conf` configuration file, and run: ``` bash $ git clone https://github.com/Fmstrat/winapps.git $ cd winapps diff --git a/bin/winapps b/bin/winapps index c486112..5e77ba5 100755 --- a/bin/winapps +++ b/bin/winapps @@ -36,12 +36,16 @@ if [ -z "$(which xfreerdp)" ]; then exit fi -if [ ! -f "${HOME}/.winapps" ]; then - echo "You need to create a ~/.winapps configuration. Exiting..." +if [ ! -f "${HOME}/.config/winapps/winapps.conf" ] && [ ! -f "${HOME}/.winapps" ]; then + echo "You need to create a ~/.config/winapps/winapps.conf configuration. Exiting..." exit fi -. "${HOME}/.winapps" +if [ -f "${HOME}/.config/winapps/winapps.conf" ]; then + . "${HOME}/.config/winapps/winapps.conf" +else + . "${HOME}/.winapps" +fi if [ -z "${RDP_IP}" ]; then if [ -z "$(groups |grep libvirt)" ]; then