Skip to content

Commit 369fae0

Browse files
Merge pull request #68 from HPCNow/main
froster v0.12.27
2 parents 18fb9d8 + 679a74b commit 369fae0

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

Diff for: .github/workflows/froster-remote-install.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: Install Froster locally
2-
run-name: Froster local install succeeded on Ubuntu-latest.
1+
name: Install Froster remotely
2+
run-name: Froster remote install succeeded on Ubuntu-latest.
33
on: [push, pull_request]
44

55
jobs:

Diff for: install.sh

+26-24
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,16 @@ check_apt_dependencies() {
116116
fi
117117

118118
# Check if lib32gcc-s1 is installed (pwalk compilation requirement)
119-
if [[ $(dpkg -l lib32gcc-s1 >/dev/null 2>&1) ]]; then
120-
echo "Error: lib32gcc-s1 is not installed."
121-
echo
122-
echo "Please install lib32gcc-s1"
123-
echo "In most linux distros you can install the latest version of lib32gcc-s1 by running the following commands:"
124-
echo " sudo apt update"
125-
echo " sudo apt install -y lib32gcc-s1"
126-
echo
127-
exit 1
128-
fi
129-
119+
if [[ $(dpkg -l lib32gcc-s1 >/dev/null 2>&1) ]]; then
120+
echo "Error: lib32gcc-s1 is not installed."
121+
echo
122+
echo "Please install lib32gcc-s1"
123+
echo "In most linux distros you can install the latest version of lib32gcc-s1 by running the following commands:"
124+
echo " sudo apt update"
125+
echo " sudo apt install -y lib32gcc-s1"
126+
echo
127+
exit 1
128+
fi
130129

131130
# Check if unzip is installed (rclone requirement)
132131
if [[ -z $(command -v unzip) ]]; then
@@ -186,15 +185,15 @@ backup_old_installation() {
186185
echo "Uninstalling existing froster installation..."
187186

188187
if pip list | grep froster >/dev/null 2>&1; then
189-
pip uninstall froster >/dev/null 2>&1 &
190-
spinner $!
188+
pip uninstall froster >/dev/null 2>&1 &
189+
spinner $!
191190
fi
192191

193192
if pipx list | grep froster >/dev/null 2>&1; then
194-
# If froster is installed with pipx, uninstall it and ignore errors
195-
# sometime pipx uninstall fails with error code 1 if PIPX_HOME is set, but froster is still uninstalled
196-
pipx uninstall froster >/dev/null 2>&1 &
197-
spinner $!
193+
# If froster is installed with pipx, uninstall it and ignore errors
194+
# sometime pipx uninstall fails with error code 1 if PIPX_HOME is set, but froster is still uninstalled
195+
pipx uninstall froster >/dev/null 2>&1 &
196+
spinner $!
198197
fi
199198

200199
echo "...froster uninstalled"
@@ -229,7 +228,7 @@ install_froster() {
229228
echo " Installing from the current directory"
230229
pip install . >/dev/null 2>&1 &
231230
spinner $!
232-
else
231+
else
233232
echo " Installing from PyPi package repository"
234233
pipx install froster >/dev/null 2>&1 &
235234
spinner $!
@@ -254,8 +253,6 @@ install_froster() {
254253
fi
255254

256255
echo "...froster installed"
257-
258-
which froster
259256
}
260257

261258
get_froster_dir() {
@@ -269,15 +266,21 @@ get_froster_dir() {
269266

270267
elif [ -f "${PIPX_HOME}/venvs/froster/bin/froster" ]; then
271268
froster_dir=$(dirname "$(readlink -f "${PIPX_HOME}/venvs/froster/bin/froster")")
272-
269+
273270
elif [ -f "${HOME}/.local/bin/froster" ]; then
274271
froster_dir=$(dirname "$(readlink -f "${HOME}/.local/bin/froster")")
275272

276273
elif [ -f "/usr/local/bin/froster" ]; then
277274
froster_dir=$(dirname "$(readlink -f "/usr/local/bin/froster")")
278275
else
279-
echo "Error: pipx installation path not found." >&2
280-
return 1
276+
froster_path=$(which froster)
277+
278+
if [ -n "$froster_path" ]; then
279+
froster_dir=$(dirname "$(readlink -f "$froster_path")")
280+
else
281+
echo "Error: pipx installation path not found."
282+
exit 1
283+
fi
281284
fi
282285

283286
echo "$froster_dir"
@@ -356,7 +359,6 @@ install_rclone() {
356359
echo " Moving rclone to froster's binaries folder"
357360
froster_dir=$(get_froster_dir)
358361
mv rclone-v*/rclone ${froster_dir}/rclone >/dev/null 2>&1
359-
360362

361363
# Remove the downloaded zip file
362364
echo " Cleaning up rclone installation files"

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "froster"
7-
version = "0.12.26"
7+
version = "0.12.27"
88
description = "Froster is a tool for easy data transfer between local file systems and AWS S3 storage."
99
authors = ["Victor Machado <[email protected]>"]
1010
readme = "README.md"

0 commit comments

Comments
 (0)