forked from Nour833/StegoForge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (27 loc) · 1.32 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·34 lines (27 loc) · 1.32 KB
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
#!/usr/bin/env bash
set -euo pipefail
project_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
venv="$project_root/.venv"
data_home="${XDG_DATA_HOME:-$HOME/.local/share}"
bin_home="$HOME/.local/bin"
desktop_file="io.github.dlpwaters.SecretLoom.desktop"
icon_file="io.github.dlpwaters.SecretLoom.svg"
if [[ ! -x "$venv/bin/python" ]]; then
python3 -m venv "$venv"
fi
"$venv/bin/python" -m pip install --disable-pip-version-check -e "$project_root"
mkdir -p -- "$bin_home" "$data_home/applications" "$data_home/icons/hicolor/scalable/apps"
ln -sfn -- "$project_root/bin/secretloom" "$bin_home/secretloom"
ln -sfn -- "$venv/bin/stegoforge" "$bin_home/stegoforge"
install -m 0644 "$project_root/share/applications/$desktop_file" "$data_home/applications/$desktop_file"
install -m 0644 "$project_root/share/icons/hicolor/scalable/apps/$icon_file" "$data_home/icons/hicolor/scalable/apps/$icon_file"
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database "$data_home/applications"
fi
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f -t "$data_home/icons/hicolor" >/dev/null 2>&1 || true
fi
printf '\nSecretLoom is installed.\n'
printf ' Shell: secretloom\n'
printf ' Launcher: search for SecretLoom in the Omarchy app launcher\n'
printf ' CLI: secretloom --help\n'