Skip to content

Commit 3917a46

Browse files
committed
switch from wget to curl
1 parent c48d240 commit 3917a46

2 files changed

Lines changed: 34 additions & 13 deletions

File tree

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Linux4Delphi Setup
22

3-
![ShellCheck](https://img.shields.io/github/actions/workflow/status/jimmckeeth/linux4delphi/commit_test.yml?job=shellcheck&label=ShellCheck&logo=shell)
4-
![Ubuntu 24.04](https://img.shields.io/github/actions/workflow/status/jimmckeeth/linux4delphi/commit_test.yml?job=ubuntu_test&label=Ubuntu%2024.04&logo=ubuntu)
5-
![RHEL 10](https://img.shields.io/github/actions/workflow/status/jimmckeeth/linux4delphi/commit_test.yml?job=rhel_test&label=RHEL%2010&logo=redhat)
6-
3+
![ShellCheck](https://img.shields.io/github/actions/workflow/status/jimmckeeth/linux4delphi/commit_test.yml?job=shellcheck&label=ShellCheck&logo=shell&version=1)
4+
![Ubuntu 24.04](https://img.shields.io/github/actions/workflow/status/jimmckeeth/linux4delphi/commit_test.yml?job=ubuntu_test&label=Ubuntu%2024.04&logo=ubuntu&version=1)
5+
![RHEL 10](https://img.shields.io/github/actions/workflow/status/jimmckeeth/linux4delphi/commit_test.yml?job=rhel_test&label=RHEL%2010&logo=redhat&version=1)
76

87
**Update**: This was formerly known as *Delphi-on-Linux-Setup*, but it has been renamed to *Linux4Delphi* to better reflect the scope of the project. Update your bookmarks and references accordingly.
98

@@ -17,15 +16,21 @@ Supporting Delphi 10.2 *Tokyo* (19.0) through Delphi 13 *Florence* (37.0)
1716

1817
## Usage
1918

20-
The same script works for both RedHat/Fedora and Ubuntu/Debian. There are a number of other quality of life improvements too. To run it from the web:
19+
The same script works for both RedHat/Fedora and Ubuntu/Debian. There are a number of other quality of life improvements too. To run it from the web use either of the following commands:
2120

2221
```bash
2322
curl -fsSL https://tinyurl.com/SetupLinux4Delphi | sudo bash
2423
```
2524

26-
⚠️*Warning*: Is is recommended to [locally review the script](scripts/SetupLinux4Delphi.sh) before running it in a *production* envorment. Also, curl is a requirement to run the above command. It is usually installed, but if you are missing it then run `sudo apt install curl -y` first.
25+
If you don't have curl you can use wget instead (Debian usually excludes curl by default):
26+
27+
```bash
28+
wget -q -O https://tinyurl.com/SetupLinux4Delphi | sudo bash
29+
```
30+
31+
⚠️*Warning*: Is is recommended to [locally review the script](scripts/SetupLinux4Delphi.sh) before running it in a *production* envorment.
2732

28-
*Update*: To improve performance, especially if testing in a containerized environment, calls to `apt`, `yum`, & `dnf`use `--no-install-recommends` or `--setopt=install_weak_deps=False` respectively, which prevents the installation of *recommended packages*, which are not essential for the core functionality. Not only does that save time and disk space, but it makes the script less likely to chage unrelated packages you might need.
33+
*Update*: To improve performance, especially if testing in a containerized environment, calls to `apt`, `yum`, & `dnf` use `--no-install-recommends` or `--setopt=install_weak_deps=False` respectively, which prevents the installation of *recommended packages*, that are not essential for the core functionality. It also makes the script less likely to change unrelated packages you might need.
2934

3035
The installation location changed now, so it isn't user specific. Also, the same script supports earlier versions of Delphi. It defaults to the latest, but you can specify any different version:
3136

scripts/SetupLinux4Delphi.sh

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
#
33
# Single step download and execute with the following:
44
# curl -fsSL https://tinyurl.com/SetupLinux4Delphi | sudo bash
5+
# or
6+
# wget -q -O https://tinyurl.com/SetupLinux4Delphi | sudo bash
57
#
68
echo "_____________________________________________________________"
79
echo ""
8-
echo "Setup Linux for Delphi development version 2025-12-16.6"
10+
echo "Setup Linux for Delphi development version 2025-12-19"
911
echo "_____________________________________________________________"
1012
echo ""
11-
echo "This script requires sudo privileges and curl."
12-
echo "More info: https://github.com/jimmckeeth/Delphi-on-Linux-Setup"
13+
echo "This script requires sudo privileges"
14+
echo "More info: https://github.com/jimmckeeth/Linux4Delphi"
1315
echo ""
1416
# Stop on all errors
1517
set -e
@@ -23,6 +25,20 @@ fi
2325
PARAM="37.0" # Default version
2426
PKG_OVERRIDE=""
2527

28+
# Function to download files using whichever tool is available
29+
download_file() {
30+
local url=$1
31+
local dest=$2
32+
if command -v wget >/dev/null 2>&1; then
33+
wget -q -O "$dest" "$url"
34+
elif command -v curl >/dev/null 2>&1; then
35+
curl -fsSL -o "$dest" "$url"
36+
else
37+
echo "❌ Error: Neither wget nor curl found. Please install one to continue."
38+
exit 1
39+
fi
40+
}
41+
2642
while [[ $# -gt 0 ]]; do
2743
key="$(echo "$1" | tr '[:upper:]' '[:lower:]')"
2844
case $key in
@@ -374,8 +390,8 @@ if ! mkdir -p "$INSTALL_DIR"; then
374390
fi
375391
echo "__________________________________________________________________"
376392
echo ""
377-
echo "Downloading Linux PAServer "
378-
wget -O "$INSTALL_DIR/$ARCHIVE" "$PASERVER_URL"
393+
echo "Downloading Linux PAServer"
394+
download_file "$PASERVER_URL" "$INSTALL_DIR/$ARCHIVE"
379395
echo "__________________________________________________________________"
380396
echo ""
381397
if ! tar xvf "$INSTALL_DIR/$ARCHIVE" -C "$INSTALL_DIR" --strip-components=1; then
@@ -420,7 +436,7 @@ echo ""
420436
echo "Install dir: $INSTALL_DIR "
421437
echo "Script path: $SCRIPT_PATH "
422438
echo "Scratch dir: $SCRATCH_DIR "
423-
echo "Password is BLANK (none) "
439+
echo "Password is BLANK (none) so you might want to change that..."
424440
echo "________________________________________"
425441
echo ""
426442
# https://docwiki.embarcadero.com/RADStudio/en/Setting_Options_for_the_Platform_Assistant

0 commit comments

Comments
 (0)