mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-20 04:26:25 +00:00
bugfix pgAdmin 4.app; cleanup others
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ pkg_link() {
|
||||
}
|
||||
|
||||
pkg_post_install() {
|
||||
webi_link
|
||||
pkg_link
|
||||
|
||||
# web_path_add is defined in _webi/template.sh at https://github.com/webinstall/packages
|
||||
# Updates PATH with
|
||||
|
||||
+1
-46
@@ -2,11 +2,7 @@ set -e
|
||||
set -u
|
||||
|
||||
pkg_cmd_name="hugo"
|
||||
pkg_dst="$HOME/.local"
|
||||
|
||||
# pkg_src isn't used in this script,
|
||||
# just setting a junk value for completeness (and possibly debug output)
|
||||
pkg_src="$HOME/Downloads/$WEBI_PKG_FILE"
|
||||
WEBI_SINGLE=true
|
||||
|
||||
pkg_get_current_version() {
|
||||
# 'hugo version' has output in this format:
|
||||
@@ -15,44 +11,3 @@ pkg_get_current_version() {
|
||||
# 0.72.0
|
||||
echo "$(hugo version 2>/dev/null | head -n 1 | cut -d' ' -f5 | cut -d '-' -f1 | sed 's:^v::')"
|
||||
}
|
||||
|
||||
pkg_format_cmd_version() {
|
||||
# 'node v12.8.0' is the canonical version format for node
|
||||
my_version="$1"
|
||||
echo "$pkg_cmd_name v$my_version"
|
||||
}
|
||||
|
||||
pkg_link() {
|
||||
# hugo is just a single file, no directory linking to do
|
||||
true
|
||||
}
|
||||
|
||||
pkg_pre_install() {
|
||||
# if selected version is installed, quit
|
||||
webi_check
|
||||
# will save to ~/Downloads/$WEBI_PKG_FILE by default
|
||||
webi_download
|
||||
# supported formats (.xz, .tar.*, .zip) will be extracted to $WEBI_TMP
|
||||
webi_extract
|
||||
}
|
||||
|
||||
pkg_install() {
|
||||
pushd "$WEBI_TMP" 2>&1 >/dev/null
|
||||
|
||||
# rename the entire extracted folder to the new location
|
||||
# (this will be "$HOME/.local/opt/node-v$WEBI_VERSION" by default)
|
||||
mkdir -p "$pkg_dst_bin"
|
||||
mv ./"$pkg_cmd_name"* "$pkg_dst_cmd"
|
||||
chmod a+x "$pkg_dst_cmd"
|
||||
|
||||
popd 2>&1 >/dev/null
|
||||
}
|
||||
|
||||
pkg_post_install() {
|
||||
# just in case we add something in the future
|
||||
pkg_link
|
||||
|
||||
# web_path_add is defined in _webi/template.sh at https://github.com/webinstall/packages
|
||||
# Adds "$HOME/.local/opt/node" to PATH
|
||||
webi_path_add "$pkg_dst_bin"
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ pkg_install() {
|
||||
pkg_link() {
|
||||
# rm -f "$HOME/.local/opt/postgres"
|
||||
rm -f "$pkg_dst"
|
||||
rm -f "$HOME/Applications/pgAdmin*.app" || true
|
||||
rm -f "$HOME/Applications/pgAdmin"*.app || true
|
||||
|
||||
# ln -s "$HOME/.local/opt/postgres-v10.13" "$HOME/.local/opt/postgres"
|
||||
ln -s "$pkg_src" "$pkg_dst"
|
||||
|
||||
Reference in New Issue
Block a user