-
Notifications
You must be signed in to change notification settings - Fork 8
/
debianize
executable file
Β·130 lines (120 loc) Β· 4.22 KB
/
debianize
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
#################################################
# Debianize - Customize your Debian OS with Debianize
# This script will allow you to install packages in just a few keystrokes
# And lists all the libraries and frameworks that will be installed
#################################################
# Colored Environment Variables
if [ -e "$(command -v tput)" ]; then
RED="$(tput setaf 1)$(tput bold)"
GREEN="$(tput setaf 2)$(tput bold)"
YELLOW="$(tput setaf 3)$(tput bold)"
NOATTR="$(tput sgr0)"
else
RED=""
GREEN=""
YELLOW=""
NOATTR=""
fi
# URL Link
URL_REPO="https://raw.githubusercontent.com/WMCB-Tech/debdroid-ng/master"
# Function to handle signal trap
sigtrap(){
echo "${RED}W: The Script generated error code 127, Quitting as requested!${NOATTR}"
exit 127
}
trap 'sigtrap' HUP INT KILL QUIT TERM
# Abort if no curl program is available
if [ ! -e "$(command -v curl)" ]; then
echo "${RED}No ${YELLOW}curl${GREEN} program is installed, Aborting....."
exit 2
fi
# Package Lists
list_packages(){
echo "${GREEN}List of Debianize Packages and Libraries:"
echo "${YELLOW} xfce4-desktop:${GREEN} XFCE Desktop with Applications (Gimp, Libreoffice, Firefox, Goodies, VLC) (Replaces ${YELLOW}xfce4-core${GREEN})"
echo "Approx: 2.4GB"
echo ""
echo "${YELLOW} xfce4-core:${GREEN} XFCE Desktop Base Packages (Replaces ${YELLOW}xfce4-desktop${GREEN})"
echo "Approx: 1GB"
echo ""
echo "${YELLOW} lxde-desktop:${GREEN} LXDE Core with preferrable applications for low end devices"
echo "Approx: 1GB"
echo ""
echo "${YELLOW} mate-desktop:${GREEN} MATE Desktop with Applications (Gimp, Libreoffice, Firefox, VLC) (Replaces ${YELLOW}mate-core${GREEN})"
echo "Approx: 2.6GB"
echo ""
echo "${YELLOW} mate-core:${GREEN} MATE Desktop Base Packages (Replaces ${YELLOW}mate-desktop${GREEN})"
echo "Approx: 1.4GB"
echo ""
echo "${YELLOW} x11-basic:${GREEN} Basic X11 Desktop with Openbox and some applications (This might be boring but good for low end devices)"
echo "Approx: 500MB"
echo ""
echo "${YELLOW} chromium:${GREEN} Chromium Web Browser (This target may not work properly on armhf devices but may work with some effort)"
echo "Approx: 300MB"
echo ""
echo "${YELLOW} cli-extras:${GREEN} Extra CLI Applications and Libraries"
echo "Approx: 300MB"
echo ""
echo "${YELLOW} cli-developer:${GREEN} CLI Development Tools and C Compilers, And Configure Tools"
echo "Approx: 600MB"
echo ""
echo "${GREEN}To Install it, simply do ${YELLOW}debianize <package>${NOATTR}"
}
show_help(){
echo "${GREEN}Debianize: Customize your Debian OS!"
echo ""
echo "This Script will allow you to install packages and libraries you need"
echo "And to patch certain stuff like chromium, so you can launch it with a click"
echo ""
echo "Syntax is:"
echo "${YELLOW}debianize [package]"
echo ""
echo "${GREEN}You can list of profiles with ${YELLOW}debianize list${GREEN} command${NOATTR}"
}
# Process Arguments
argument="$1"
if [ -z "${argument}" ]; then
show_help
exit 2
fi
case "${argument}" in
xfce-desktop|xfce4-desktop)
source <(curl -sSL --insecure ${URL_REPO}/tasks/xfce4-desktop)
;;
xfce-core|xfce4-core)
source <(curl -sSL --insecure ${URL_REPO}/tasks/xfce4-core)
;;
lxde|lxde-desktop)
source <(curl -sSL --insecure ${URL_REPO}/tasks/lxde-desktop)
;;
mate-desktop)
source <(curl -sSL --insecure ${URL_REPO}/tasks/mate-desktop)
;;
mate-core)
source <(curl -sSL --insecure ${URL_REPO}/tasks/mate-core)
;;
x11-basic|x11-core)
source <(curl -sSL --insecure ${URL_REPO}/tasks/x11-basic)
;;
chromium|chromium-browser)
source <(curl -sSL --insecure ${URL_REPO}/tasks/chromium)
;;
cli-extras)
source <(curl -sSL --insecure ${URL_REPO}/tasks/cli-extras)
;;
cli-dev*|build-essential)
source <(curl -sSL --insecure ${URL_REPO}/tasks/cli-development)
;;
help)
show_help
;;
list)
list_packages
;;
*)
echo "${RED}E: Unknown Profile: ${YELLOW}${argument}${NOATTR}"
exit 2
;;
esac
# END OF MESSAGE