Skip to content

Commit 749b77e

Browse files
committed
Improve binary size
1 parent b8ffa70 commit 749b77e

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ indicatif = "0.17"
3030
curl-parser = { "git" = "https://github.com/omarmhaimdat/curl-parser" }
3131

3232
[profile.release]
33-
opt-level = 3
34-
lto = true
33+
opt-level = "z"
34+
lto = "fat"
3535
codegen-units = 1
36-
strip = true
36+
strip = "symbols"
3737

3838
[[bin]]
3939
name = "pepe"

install.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ "$(uname)" = "Darwin" ]; then
1919
echo "pepe installed successfully using Homebrew!"
2020
else
2121
echo "Homebrew not found, downloading pepe for macOS..."
22-
curl -L -o pepe "https://pepe.mhaimdat.com/0.2.1/$(uname -m)-apple-darwin/pepe"
22+
curl -L -o pepe "https://pepe.mhaimdat.com/0.2.2/$(uname -m)-apple-darwin/pepe"
2323
chmod +x pepe
2424
mv pepe /usr/local/bin/
2525
echo "pepe for macOS downloaded and installed successfully!"
@@ -53,8 +53,8 @@ elif [ "$(uname -s)" = "Linux" ]; then
5353
cd "$TEMP_DIR"
5454

5555
echo "Downloading binary..."
56-
curl -L -O "https://pepe.mhaimdat.com/0.2.1/x86_64-unknown-linux-gnu/pepe"
57-
curl -L -O "https://pepe.mhaimdat.com/0.2.1/x86_64-unknown-linux-gnu/pepe.sha256"
56+
curl -L -O "https://pepe.mhaimdat.com/0.2.2/x86_64-unknown-linux-gnu/pepe"
57+
curl -L -O "https://pepe.mhaimdat.com/0.2.2/x86_64-unknown-linux-gnu/pepe.sha256"
5858

5959
echo "Verifying binary integrity..."
6060
EXPECTED_CHECKSUM=$(cat pepe.sha256)
@@ -81,7 +81,12 @@ elif [ "$(uname -s)" = "Linux" ]; then
8181
if [ ! -f "$PROFILE_FILE" ] || ! grep -q "$USER_BIN_DIR" "$PROFILE_FILE"; then
8282
echo "export PATH=\"$USER_BIN_DIR:$PATH\"" >> "$PROFILE_FILE"
8383
echo "Added $USER_BIN_DIR to your PATH in $PROFILE_FILE"
84-
echo "Please run 'source $PROFILE_FILE' to update your PATH"
84+
if has_sudo; then
85+
source $PROFILE_FILE
86+
else
87+
echo -e "\033[1;33m⚠️ Please run this command to update your PATH:\033[0m"
88+
echo -e "\033[1;32msource $PROFILE_FILE\033[0m"
89+
fi
8590
fi
8691

8792
# Install the binary

0 commit comments

Comments
 (0)