Skip to content

Commit 02fcd5d

Browse files
committed
bump version
1 parent 44f52e2 commit 02fcd5d

File tree

3 files changed

+95
-23
lines changed

3 files changed

+95
-23
lines changed

β€Žinstall-template.shβ€Ž

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -e
2+
set -eEuo pipefail
33

44
# This line will be replaced by the release script with the correct version
55
VERSION=.*
@@ -9,29 +9,65 @@ ARCHIVE="fcitx5-lekhika-${VERSION}.tar.gz"
99
URL="https://github.com/${REPO}/releases/download/${VERSION}/${ARCHIVE}"
1010

1111
TMPDIR=$(mktemp -d)
12-
INSTALL_DIR="/usr/lib/fcitx5"
12+
INSTALL_DIR="/usr/lib/x86_64-linux-gnu/fcitx5"
1313
DATA_DIR="/usr/share/fcitx5/fcitx5-lekhika"
1414
ICON_DIR="/usr/share/icons/hicolor/48x48/apps"
1515

16+
# Cleanup on error
17+
trap 'echo "⚠️ Installation failed. Cleaning up..."; rm -rf "$TMPDIR"; exit 1' ERR
18+
1619
echo "πŸ“₯ Downloading prebuilt engine version $VERSION..."
1720
cd "$TMPDIR"
18-
curl -sL "$URL" -o "$ARCHIVE"
21+
if ! curl -sL "$URL" -o "$ARCHIVE"; then
22+
echo "❌ Failed to download $ARCHIVE from $URL"
23+
echo " Ensure the version number is correct and the release exists."
24+
exit 1
25+
fi
26+
echo "βœ… Archive downloaded: $ARCHIVE"
1927

2028
echo "πŸ“¦ Extracting archive..."
21-
tar -xzf "$ARCHIVE"
29+
if ! tar -xzf "$ARCHIVE"; then
30+
echo "❌ Failed to extract $ARCHIVE"
31+
echo " The archive may be corrupt or missing expected files."
32+
exit 1
33+
fi
34+
echo "βœ… Extraction complete"
35+
36+
echo "🧩 Installing engine binary..."
37+
sudo install -Dm755 fcitx5lekhika.so "$INSTALL_DIR/fcitx5lekhika.so" && \
38+
echo "βœ… Installed: $INSTALL_DIR/fcitx5lekhika.so"
39+
40+
echo "πŸ› οΈ Installing configuration files..."
41+
sudo install -Dm644 config/fcitx5lekhika.addon.conf /usr/share/fcitx5/addon/fcitx5lekhika.conf && \
42+
echo "βœ… Installed: /usr/share/fcitx5/addon/fcitx5lekhika.conf"
2243

23-
echo "🧩 Installing shared object and configuration files..."
24-
sudo install -Dm755 fcitx5lekhika.so "$INSTALL_DIR/fcitx5lekhika.so"
25-
sudo install -Dm644 config/fcitx5lekhika.addon.conf /usr/share/fcitx5/addon/fcitx5lekhika.conf
26-
sudo install -Dm644 config/fcitx5lekhika.conf /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf
44+
sudo install -Dm644 config/fcitx5lekhika.conf /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf && \
45+
echo "βœ… Installed: /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf"
2746

2847
echo "πŸ—‚οΈ Installing transliteration data..."
2948
sudo install -d "$DATA_DIR"
30-
sudo install -m644 data/*.toml "$DATA_DIR"
49+
sudo install -m644 data/*.toml "$DATA_DIR" && \
50+
echo "βœ… Installed TOML files to: $DATA_DIR"
3151

3252
echo "🎨 Installing icon..."
33-
sudo install -Dm644 icons/48x48/apps/lekhika.png "$ICON_DIR/lekhika.png"
53+
sudo install -Dm644 icons/48x48/apps/lekhika.png "$ICON_DIR/lekhika.png" && \
54+
echo "βœ… Installed icon: $ICON_DIR/lekhika.png"
3455

35-
echo "βœ… Installation complete! Launch 'fcitx5-configtool' to enable fcitx5-lekhika."
56+
echo "🎨 Updating font cache..."
57+
sudo fc-cache -fv > /dev/null && echo "βœ… Font cache updated"
58+
59+
echo ""
60+
echo "πŸ“ Summary of installed components:"
61+
echo " - Engine: $INSTALL_DIR/fcitx5lekhika.so"
62+
echo " - Configs:"
63+
echo " β€’ /usr/share/fcitx5/addon/fcitx5lekhika.conf"
64+
echo " β€’ /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf"
65+
echo " - Transliteration data: $DATA_DIR"
66+
echo " - Icon: $ICON_DIR/lekhika.png"
67+
echo ""
68+
69+
echo "βœ… Installation complete! Use 'fcitx5-configtool' to enable fcitx5-lekhika."
3670

3771
rm -rf "$TMPDIR"
72+
73+
echo "βœ… Temporary files cleaned"

β€Žinstall.shβ€Ž

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
2-
set -e
2+
set -eEuo pipefail
33

44
# This line will be replaced by the release script with the correct version
5-
VERSION=2.0.0
5+
VERSION=2.0.1
66

77
REPO="khumnath/fcitx5-lekhika"
88
ARCHIVE="fcitx5-lekhika-${VERSION}.tar.gz"
@@ -13,25 +13,61 @@ INSTALL_DIR="/usr/lib/x86_64-linux-gnu/fcitx5"
1313
DATA_DIR="/usr/share/fcitx5/fcitx5-lekhika"
1414
ICON_DIR="/usr/share/icons/hicolor/48x48/apps"
1515

16+
# Cleanup on error
17+
trap 'echo "⚠️ Installation failed. Cleaning up..."; rm -rf "$TMPDIR"; exit 1' ERR
18+
1619
echo "πŸ“₯ Downloading prebuilt engine version $VERSION..."
1720
cd "$TMPDIR"
18-
curl -sL "$URL" -o "$ARCHIVE"
21+
if ! curl -sL "$URL" -o "$ARCHIVE"; then
22+
echo "❌ Failed to download $ARCHIVE from $URL"
23+
echo " Ensure the version number is correct and the release exists."
24+
exit 1
25+
fi
26+
echo "βœ… Archive downloaded: $ARCHIVE"
1927

2028
echo "πŸ“¦ Extracting archive..."
21-
tar -xzf "$ARCHIVE"
29+
if ! tar -xzf "$ARCHIVE"; then
30+
echo "❌ Failed to extract $ARCHIVE"
31+
echo " The archive may be corrupt or missing expected files."
32+
exit 1
33+
fi
34+
echo "βœ… Extraction complete"
35+
36+
echo "🧩 Installing engine binary..."
37+
sudo install -Dm755 fcitx5lekhika.so "$INSTALL_DIR/fcitx5lekhika.so" && \
38+
echo "βœ… Installed: $INSTALL_DIR/fcitx5lekhika.so"
39+
40+
echo "πŸ› οΈ Installing configuration files..."
41+
sudo install -Dm644 config/fcitx5lekhika.addon.conf /usr/share/fcitx5/addon/fcitx5lekhika.conf && \
42+
echo "βœ… Installed: /usr/share/fcitx5/addon/fcitx5lekhika.conf"
2243

23-
echo "🧩 Installing shared object and configuration files..."
24-
sudo install -Dm755 fcitx5lekhika.so "$INSTALL_DIR/fcitx5lekhika.so"
25-
sudo install -Dm644 config/fcitx5lekhika.addon.conf /usr/share/fcitx5/addon/fcitx5lekhika.conf
26-
sudo install -Dm644 config/fcitx5lekhika.conf /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf
44+
sudo install -Dm644 config/fcitx5lekhika.conf /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf && \
45+
echo "βœ… Installed: /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf"
2746

2847
echo "πŸ—‚οΈ Installing transliteration data..."
2948
sudo install -d "$DATA_DIR"
30-
sudo install -m644 data/*.toml "$DATA_DIR"
49+
sudo install -m644 data/*.toml "$DATA_DIR" && \
50+
echo "βœ… Installed TOML files to: $DATA_DIR"
3151

3252
echo "🎨 Installing icon..."
33-
sudo install -Dm644 icons/48x48/apps/lekhika.png "$ICON_DIR/lekhika.png"
53+
sudo install -Dm644 icons/48x48/apps/lekhika.png "$ICON_DIR/lekhika.png" && \
54+
echo "βœ… Installed icon: $ICON_DIR/lekhika.png"
3455

35-
echo "βœ… Installation complete! Launch 'fcitx5-configtool' to enable fcitx5-lekhika."
56+
echo "🎨 Updating font cache..."
57+
sudo fc-cache -fv > /dev/null && echo "βœ… Font cache updated"
58+
59+
echo ""
60+
echo "πŸ“ Summary of installed components:"
61+
echo " - Engine: $INSTALL_DIR/fcitx5lekhika.so"
62+
echo " - Configs:"
63+
echo " β€’ /usr/share/fcitx5/addon/fcitx5lekhika.conf"
64+
echo " β€’ /usr/share/fcitx5/inputmethod/fcitx5lekhika.conf"
65+
echo " - Transliteration data: $DATA_DIR"
66+
echo " - Icon: $ICON_DIR/lekhika.png"
67+
echo ""
68+
69+
echo "βœ… Installation complete! Use 'fcitx5-configtool' to enable fcitx5-lekhika."
3670

3771
rm -rf "$TMPDIR"
72+
73+
echo "βœ… Temporary files cleaned"

β€Žversion.txtβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0
1+
2.0.1

0 commit comments

Comments
Β (0)