Skip to content

Commit ee4f5c0

Browse files
Add id_like=debian
1 parent 212042f commit ee4f5c0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ sanity-check: ## output environment variables
7575
@echo "UNAME: ${UNAME}"
7676
@echo "SHELL: ${SHELL}"
7777
@echo "ID: ${ID}"
78+
@echo "ID_LIKE: ${ID_LIKE}"
7879
@echo "XCODE: ${XCODE}"
7980
@echo "BREW: ${BREW}"
8081
@echo "HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: ${HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK}"
@@ -105,7 +106,7 @@ update: ## update package manager
105106
@echo "Updating package manager..."
106107
if [ "${UNAME}" = "Darwin" ] && [ "$(command -v brew >/dev/null 2>&1; echo $?)" -eq 0 ]; then \
107108
brew update; \
108-
elif [ "${ID}" = "ubuntu" ]; then \
109+
elif [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ]; then \
109110
sudo apt update; \
110111
elif [ "${ID}" = "fedora" ]; then \
111112
sudo dnf update; \
@@ -117,7 +118,7 @@ git: ## install git
117118
@echo "Installing Git..."
118119
if [ "${UNAME}" = "Darwin" ] && [ "$(command -v brew >/dev/null 2>&1; echo $?)" -eq 0 ]; then \
119120
brew install git; \
120-
elif [ "${ID}" = "ubuntu" ]; then \
121+
elif [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ]; then \
121122
sudo apt install -y git; \
122123
elif [ "${ID}" = "fedora" ]; then \
123124
sudo dnf install -y git; \
@@ -131,7 +132,7 @@ python: ## install python
131132
@echo "Installing Python..."
132133
if [ "${UNAME}" = "Darwin" ] && [ -z "${PYTHON}" ]; then \
133134
brew install python; \
134-
elif [ "${ID}" = "ubuntu" ]; then \
135+
elif [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ]; then \
135136
sudo apt install -y python3; \
136137
elif [ "${ID}" = "fedora" ]; then \
137138
sudo dnf install -y python3; \
@@ -145,7 +146,7 @@ pip: python ## install pip
145146
@echo "Installing Pip..."
146147
if [ "${UNAME}" = "Darwin" ] && [ -z "${PYTHON})" ]; then \
147148
brew install python; \
148-
elif [ "${ID}" = "ubuntu" ] && [ -z "${PIP}" ]; then \
149+
elif [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ] && [ -z "${PIP}" ]; then \
149150
sudo apt install -y python3-pip; \
150151
elif [ "${ID}" = "fedora" ] && [ -z "${PIP}" ]; then \
151152
sudo dnf install -y python3-pip; \
@@ -183,22 +184,23 @@ ansible-galaxy: ansible git ## install ansible galaxy roles
183184
"${ANSIBLE_GALAXY}" install -r /tmp/requirements.yml; \
184185
fi
185186

187+
# TODO: QA @ kali
186188
mpr: ## install the makedeb package repo (mpr) for prebuilt packages
187189
@echo "Installing the makedeb package repo (mpr)..."
188-
if [ "${ID}" = "ubuntu" ]; then \
190+
if [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ]; then \
189191
[ -z "${WGET}" ] || sudo apt install -y wget; \
190192
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null; \
191193
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list; \
192194
else \
193195
echo "mpr not available on ${UNAME}."; \
194196
fi
195197

196-
just: mpr update## install justfile
198+
just: mpr update ## install justfile
197199
if [ -z "${WGET}" ] && [ -z "${JUST}" ]; then \
198200
echo "Installing Justfile..."; \
199201
if [ "${UNAME}" = "Darwin" ]; then \
200202
brew install just; \
201-
elif [ "${ID}" = "ubuntu" ]; then \
203+
elif [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ]; then \
202204
sudo apt install -y just; \
203205
elif [ "${ID}" = "fedora" ]; then \
204206
sudo dnf install -y just; \
@@ -213,7 +215,7 @@ tldr: ## install tldr
213215
@echo "Installing Pip..."
214216
if [ "${UNAME}" = "Darwin" ] && [ -z "${PYTHON})" ]; then \
215217
brew install tldr; \
216-
elif [ "${ID}" = "ubuntu" ] && [ -z "${PIP}" ]; then \
218+
elif [ "${ID}" = "ubuntu" ] || [ "${ID_LIKE}" = "debian" ] && [ -z "${PIP}" ]; then \
217219
sudo apt install -y tldr-py; \
218220
elif [ "${ID}" = "fedora" ] && [ -z "${PIP}" ]; then \
219221
sudo dnf install -y tldr; \

0 commit comments

Comments
 (0)