Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #5

Merged
merged 2 commits into from
Jun 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 169 additions & 1 deletion penguin
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,175 @@ function distroConfig() {
fi
sleep 2.4
;;
void) ;;
void)

echo "$(stdio stdout $distro removing /:etc/resolv.conf)"
rm -rf $source/$folder/etc/resolv.conf
if [[ $? -ne 0 ]]; then
echo "$(stdio stderr remove $folder/etc/resolv.conf)"
inputRemove=
readline "skip" "remove" "Y"
if [[ ${inputSkip,,} == "n" ]]; then
echo -e "$(stdio stderr remove aborted)\n"
exit 1
fi
fi

echo "$(stdio stdout $distro creating /:etc/resolf.conf)"
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4\nnameserver 192.168.1.1\nnameserver 127.0.0.1" > $source/$folder/etc/resolv.conf
if [[ $? -ne 0 ]]; then
echo "$(stdio stderr create $folder/etc/resolv.conf)"
inputRemove=
readline "skip" "create" "Y"
if [[ ${inputSkip,,} == "n" ]]; then
echo -e "$(stdio stderr create aborted)\n"
exit 1
fi
fi

case ${select,,} in
cli)
;;
desktop)
case ${desktop^^} in
LXDE)
local rinku=(
"https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS/LXDE"
"lxde_de.sh"
)
;;
LXQT)
local rinku=(
"https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS/LXQT"
"lxqt_de.sh"
)
;;
XFCE)
local rinku=(
"https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS/XFCE4"
"xfce4_de.sh"
)
;;
esac

echo "$(stdio stdout $distro removing /:root/.bash_profile)"
rm -rf $source/$folder/root/.bash_profile

echo "$(stdio stdout $distro creating /:root/.bash_profile)"
cat <<- EOF > $source/$folder/root/.bash_profile
#!/usr/bin/env bash

# Installing required packages.
xbps-install -u xbps -y
xbps-install -Su -y > /dev/null
xbps-install -S ${desktop,,} tigervnc wget screenfetch sudo -y

clear

if [[ ! -f ~/${desktop}.sh ]]; then
echo -e "$(stdio stdout $distro downloading ${desktop}.sh)"
wget --tries=20 ${rinku[0]}/${rinku[1]}.sh -O ~/${desktop}.sh
fi
bash ~/${desktop}.sh
clear

if [[ ! -f /usr/local/bin/vncserver-start ]]; then
echo -e "$(stdio stdout $distro downloading /usr/bin/local/vncserver-start)"
wget --tries=20 ${rinku[2]}/vncserver-start -O /usr/local/bin/vncserver-start

echo -e "$(stdio stdout $distro chmod+x /usr/local/bin/vncserver-start)"
chmod +x /usr/local/bin/vncserver-start

echo -e "$(stdio stdout $distro downloading /usr/local/bin/vncserver-stop)"
wget --tries=20 ${rinku[2]}/vncserver-stop -O /usr/local/bin/vncserver-stop

echo -e "$(stdio stdout $distro chmod+x /usr/local/bin/vncserver-stop)"
chmod +x /usr/local/bin/vncserver-stop
fi
clear

if [[ ! -f /usr/bin/vncserver ]]; then
xbps-install -S lxde tigervnc wget -y > /dev/null
fi
clear

echo -e "$(stdio stdout $distro removing ${desktop}.sh)"
rm -rf ~/${desktop}.sh

echo -e "$(stdio stdout $distro removing .bash_profile)"
rm -rf ~/.bash_profile

# Displaying screenfetch.
clear && screenfetch -A "Void" && echo
sleep 2.4
EOF

echo "$(stdio stdout $distro chmod+x /:root/.bash_profile)"
chmod +x $source/$folder/root/.bash_profile
;;
window)

declare -A rinku=(
[1]="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/XBPS"
[2]="https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/WM/XBPS"
)

echo "$(stdio stdout $distro downloading /:root/${window}.sh)"
wget -q --tries=20 ${rinku[2]}/${window}.sh --show-progress --progress=bar:force:noscroll -O $source/$folder/root/${window}.sh
if [[ $? -ne 0 ]]; then
echo "$(stdio stderr $distro download /:root/${window}.sh)"
inputSkip=
readline "download" "skip" "Y"
if [[ ${inputSkip,,} == "n" ]]; then
echo -e "$(stdio stderr $distro download aborted)\n"
exit 1
fi
else
echo "$(stdio stdout $distro chmod+x /:root/${window}.sh)"
chmod +x $source/$folder/root/${window}.sh
fi

echo "$(stdio stdout $distro removing /:root/.bash_profile)"
rm -rf $source/$folder/root/.bash_profile

echo "$(stdio stdout $distro creating /:root/.bash_profile)"
cat <<- EOF > $source/$folder/root/.bash_profile
#!/usr/bin/env bash

# Installing required packages.
xbps-install -u xbps -y
xbps-install -Su -y > /dev/null
xbps-install -S lxde tigervnc wget screenfetch sudo -y

if [[ ! -f ~/${window}.sh ]]; then
echo -e "$(stdio stdout $distro downloading ${window}.sh)"
wget --tries=20 ${rinku[2]}/${window}.sh -O ~/${window}.sh
fi
bash ~/${window}.sh
clear

if [[ ! -f /usr/bin/vncserver ]]; then
xbps-install -S ${window,,} tigervnc wget -y > /dev/null
fi
clear

echo -e "$(stdio stout $distro removing ${window}.sh)"
rm -rf ~/${window}.sh

echo -e "$(stdio stout $distro removing .bash_profile)"
rm -rf ~/.bash_profile

# Displaying screenfetch.
clear && screenfetch -A "Void" && echo
sleep 2.4
EOF

echo "$(stdio stdout $distro chmod+x /:root/.bash_profile)"
chmod +x $source/$folder/root/.bash_profile
;;
esac
sleep 2.4
;;
*)
echo -e "$(stdio stderr unknown distro $distro)\n"
exit 1
Expand Down