-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from 23xvx/add-support-platform-termux
Keep improving plugins/envsetup
- Loading branch information
Showing
6 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# username = FS_USER | ||
# password = FS_PASS | ||
|
||
useradd -m \ | ||
-p "$(openssl passwd -1 FS_PASS)" \ | ||
-G sudo \ | ||
-d /home/FS_USER \ | ||
-k /etc/skel \ | ||
-s /bin/bash \ | ||
FS_USER | ||
echo FS_USER ALL=\(root\) ALL > /etc/sudoers.d/FS_USER | ||
chmod 0440 /etc/sudoers.d/FS_USER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# sudo check | ||
if [ "$(id -u)" != "0" ]; then | ||
if ! command -v sudo >/dev/null 2>&1; then | ||
echo "This script requires sudo or root privileges but none present." | ||
exit 1 | ||
else | ||
SUDO="$(command -v sudo)" | ||
if [ "$(uname -o)" = "Android" ]; then | ||
echo "Running in Termux" | ||
apt update | ||
apt install debootstrap which -y | ||
else | ||
if [ "$(id -u)" != "0" ]; then | ||
if ! command -v sudo >/dev/null 2>&1; then | ||
echo "This script requires sudo or root privileges but none present." | ||
exit 1 | ||
else | ||
SUDO="$(command -v sudo)" | ||
fi | ||
fi | ||
$SUDO apt update | ||
$SUDO apt install -y qemu-user-static binfmt-support | ||
fi | ||
|
||
deps="qemu-user-static binfmt-support" | ||
|
||
$SUDO apt install -y "$deps" |