From ac87fda61d8b48b41d3f18bc72f18bc1257fa271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Harriet=20Asi=C3=B1ero?= Date: Fri, 16 Sep 2022 15:41:34 +0800 Subject: [PATCH] fix: install.sh: get current user instead of root on the automatic install script (#239) * Get current user instead of root on the install.sh script * Added automatic install steps on README.md --- README.md | 4 ++++ install.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e922746..05a4be5 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ adb devices # You should now see your device ``` +### Using the automtic install script +1. Clone this repository +2. Run the `install.sh` as root on your terminal + ## To Contribute 1. Fork this repository. diff --git a/install.sh b/install.sh index fc5f88a..f7c4bfb 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ else groupadd adbusers fi -usermod -a -G adbusers "$USER" +usermod -a -G adbusers "$(logname)" udevadm control --reload-rules if [ "$USE_SERVICE_CMD" = "true" ]; then