From: AJ ONeal Date: Sun, 14 Jun 2020 19:24:05 +0000 (-0600) Subject: update variables _new_ => _src_, _common_ => _dst_, X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=9469f29e2f6e6584dcedf269976eaf726a378fea;p=webi-installers%2F.git update variables _new_ => _src_, _common_ => _dst_, --- diff --git a/README.md b/README.md index 9a01abc..c082b0f 100644 --- a/README.md +++ b/README.md @@ -93,14 +93,14 @@ module.exports = function (request) { pkg_cmd_name="foobar" # These are used for symlinks, PATH, and test commands -pkg_common_opt="$HOME/.local/opt/foobar" -pkg_common_bin="$HOME/.local/opt/foobar/bin" -pkg_common_cmd="$HOME/.local/opt/foobar/bin/foobar" +pkg_dst="$HOME/.local/opt/foobar" +pkg_dst_bin="$HOME/.local/opt/foobar/bin" +pkg_dst_cmd="$HOME/.local/opt/foobar/bin/foobar" # These are the _real_ locations for the above -pkg_new_opt="$HOME/.local/opt/foobar-v$WEBI_VERSION" -pkg_new_bin="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin" -pkg_new_cmd="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin/foobar" +pkg_src="$HOME/.local/opt/foobar-v$WEBI_VERSION" +pkg_src_bin="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin" +pkg_src_cmd="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin/foobar" ``` (required) A version check function that strips all non-version junk @@ -115,25 +115,25 @@ pkg_get_current_version() { For the rest of the functions you can like copy/paste from the examples: ```bash -pkg_format_cmd_version() {} # Optional, pretty prints version +pkg_format_cmd_version() {} # Optional, pretty prints version -pkg_link_new_version() {} # Required, may be empty for $HOME/.local/bin commands +pkg_link_src_dst() {} # Required, may be empty for $HOME/.local/bin commands -pkg_pre_install() { # Required, runs any webi_* commands - webi_check # for $HOME/.local/opt tools - webi_download # for things that have a releases.js - webi_extract # for .xz, .tar.*, and .zip files +pkg_pre_install() { # Required, runs any webi_* commands + webi_check # for $HOME/.local/opt tools + webi_download # for things that have a releases.js + webi_extract # for .xz, .tar.*, and .zip files } -pkg_install() {} # Required, usually just needs to rename extracted folder to - # "$HOME/.local/opt/$pkg_cmd_name-v$WEBI_VERSION" +pkg_install() {} # Required, usually just needs to rename extracted folder to + # "$HOME/.local/opt/$pkg_cmd_name-v$WEBI_VERSION" -pkg_post_install() { # Required - pkg_link_new_version # should probably call pkg_link_new_version() - webi_path_add "$pkg_common_bin" # should probably update PATH +pkg_post_install() { # Required + pkg_link_src_dst # should probably call pkg_link_src_dst() + webi_path_add "$pkg_dst_bin" # should probably update PATH } -pkg_post_install_message() {} # Optional, pretty print a success message +pkg_post_install_message() {} # Optional, pretty print a success message ``` ## Script API diff --git a/_example/install.bash b/_example/install.bash index 9513225..619534d 100644 --- a/_example/install.bash +++ b/_example/install.bash @@ -14,13 +14,13 @@ set -u pkg_cmd_name="xmpl" ## Some of these directories may be the same, in some cases -#pkg_common_opt="$HOME/.local/opt/xmpl" -#pkg_common_bin="$HOME/.local/opt/xmpl/bin" -#pkg_common_cmd="$HOME/.local/opt/xmpl/bin/xmpl" +#pkg_dst="$HOME/.local/opt/xmpl" +#pkg_dst_bin="$HOME/.local/opt/xmpl/bin" +#pkg_dst_cmd="$HOME/.local/opt/xmpl/bin/xmpl" -#pkg_new_opt="$HOME/.local/opt/xmpl-v$WEBI_VERSION" -#pkg_new_bin="$HOME/.local/opt/xmpl-v$WEBI_VERSION/bin" -#pkg_new_cmd="$HOME/.local/opt/xmpl-v$WEBI_VERSION/bin/xmpl" +#pkg_src="$HOME/.local/opt/xmpl-v$WEBI_VERSION" +#pkg_src_bin="$HOME/.local/opt/xmpl-v$WEBI_VERSION/bin" +#pkg_src_cmd="$HOME/.local/opt/xmpl-v$WEBI_VERSION/bin/xmpl" # Different packages represent the version in different ways # ex: node v12.8.0 (leading 'v') @@ -40,9 +40,9 @@ pkg_get_current_version() { # For (re-)linking to the desired installed version # (for example: 'go' is special and needs both $HOME/go and $HOME/.local/opt/go) # (others like 'rg', 'hugo', and 'caddy' are single files that just get replaced) -pkg_link_new_version() { - rm -rf "$pkg_common_opt" - ln -s "$pkg_new_opt" "$pkg_common_opt" +pkg_link_src_dst() { + rm -rf "$pkg_dst" + ln -s "$pkg_src" "$pkg_dst" } pkg_pre_install() { @@ -63,21 +63,21 @@ pkg_install() { pushd "$WEBI_TMP" 2>&1 >/dev/null # remove the versioned folder, just in case it's there with junk - rm -rf "$pkg_new_opt" + rm -rf "$pkg_src" # rename the entire extracted folder to the new location # (this will be "$HOME/.local/opt/xmpl-v$WEBI_VERSION" by default) - mv ./"$pkg_cmd_name"* "$pkg_new_opt" + mv ./"$pkg_cmd_name"* "$pkg_src" popd 2>&1 >/dev/null } # For updating PATHs and installing companion tools pkg_post_install() { - pkg_link_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" } pkg_post_install_message() { diff --git a/_example/install_safe_copy.bash b/_example/install_safe_copy.bash index 1296ed0..c52b018 100644 --- a/_example/install_safe_copy.bash +++ b/_example/install_safe_copy.bash @@ -3,10 +3,10 @@ pkg_install() { pushd "$WEBI_TMP" 2>&1 >/dev/null if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then - rsync -Krl ./xmpl*/ "$pkg_new_opt/" 2>/dev/null + rsync -Krl ./xmpl*/ "$pkg_src/" 2>/dev/null else - cp -Hr ./xmpl*/* "$pkg_new_opt/" 2>/dev/null - cp -Hr ./xmpl*/.* "$pkg_new_opt/" 2>/dev/null + cp -Hr ./xmpl*/* "$pkg_src/" 2>/dev/null + cp -Hr ./xmpl*/.* "$pkg_src/" 2>/dev/null fi rm -rf ./xmpl* diff --git a/caddy/install.bash b/caddy/install.bash index 73fd2d0..5f6a98f 100644 --- a/caddy/install.bash +++ b/caddy/install.bash @@ -12,10 +12,11 @@ set -e set -u pkg_cmd_name="caddy" -pkg_common_opt="$HOME/.local" +pkg_dst="$HOME/.local" -# just a junk file so that the version check always fails for non-current versions -pkg_new_opt="$HOME/.local/opt/caddy-doesntexist111" +# the "source" here isn't used, nor very meaningful, +# but we'll use the download location as a junk value +pkg_src="$HOME/Downloads/$WEBI_PKG_FILE" pkg_get_current_version() { # 'caddy version' has output in this format: @@ -31,7 +32,7 @@ pkg_format_cmd_version() { echo "$pkg_cmd_name v$my_version" } -pkg_link_new_version() { +pkg_link_src_dst() { # caddy is just a single file, no directory linking to do true } @@ -49,34 +50,34 @@ pkg_install() { pushd "$WEBI_TMP" 2>&1 >/dev/null # ensure the bin dir exists - mkdir -p "$pkg_common_bin" + mkdir -p "$pkg_dst_bin" # rename the entire extracted folder to the new location # (this will be "$HOME/.local/bin/caddy", as set above) # ex (full directory): ./node-v13-linux-amd64/bin/node.exe - #mv ./"$pkg_cmd_name"* "$pkg_new_opt" + #mv ./"$pkg_cmd_name"* "$pkg_src" # ex (single file): ./caddy-v2.0.0-linux-amd64.exe - mv ./"$pkg_cmd_name"* "$pkg_common_cmd" - chmod a+x "$pkg_common_cmd" + mv ./"$pkg_cmd_name"* "$pkg_dst_cmd" + chmod a+x "$pkg_dst_cmd" # ex (single file, nested in directory): ./rg/rg-v13-linux-amd64 #mv ./"$pkg_cmd_name"*/"$pkg_cmd_name"* "$pkg_commend_cmd" - #chmod a+x "$pkg_common_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_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages # Adds "$HOME/.local/bin" to PATH - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" } pkg_post_install_message() { - echo "Installed 'caddy' v$WEBI_VERSION as $pkg_common_cmd" + echo "Installed 'caddy' v$WEBI_VERSION as $pkg_dst_cmd" } diff --git a/flutter/install.bash b/flutter/install.bash index 5962242..0ad1f29 100644 --- a/flutter/install.bash +++ b/flutter/install.bash @@ -16,8 +16,8 @@ set -u # NOTE: pkg_* variables can be defined here # pkg_cmd_name -# pkg_new_opt, pkg_new_bin, pkg_new_cmd -# pkg_common_opt, pkg_common_bin, pkg_common_cmd +# pkg_src, pkg_src_bin, pkg_src_cmd +# pkg_dst, pkg_dst_bin, pkg_dst_cmd # # Their defaults are defined in webi/template.bash at https://github.com/webinstall/packages @@ -34,11 +34,11 @@ pkg_get_current_version() { echo "$(flutter --version 2>/dev/null | head -n 1 | cut -d' ' -f2)" } -pkg_link_new_version() { - # 'pkg_common_opt' will default to $HOME/.local/opt/flutter - # 'pkg_new_opt' will be the installed version, such as to $HOME/.local/opt/flutter-v1.17.3 - rm -rf "$pkg_common_opt" - ln -s "$pkg_new_opt" "$pkg_common_opt" +pkg_link_src_dst() { + # 'pkg_dst' will default to $HOME/.local/opt/flutter + # 'pkg_src' will be the installed version, such as to $HOME/.local/opt/flutter-v1.17.3 + rm -rf "$pkg_dst" + ln -s "$pkg_src" "$pkg_dst" } pkg_pre_install() { @@ -61,19 +61,19 @@ pkg_install() { pushd "$WEBI_TMP" 2>&1 >/dev/null # remove the versioned folder, just in case it's there with junk - rm -rf "$pkg_new_opt" + rm -rf "$pkg_src" # rename the entire extracted folder to the new location # (this will be "$HOME/.local/opt/flutter-v$WEBI_VERSION" by default) - mv ./flutter* "$pkg_new_opt" + mv ./flutter* "$pkg_src" popd 2>&1 >/dev/null } pkg_post_install() { - pkg_link_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages # Adds "$HOME/.local/opt/flutter" to PATH - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" } diff --git a/gitea/install.bash b/gitea/install.bash index d54a3e5..43af834 100644 --- a/gitea/install.bash +++ b/gitea/install.bash @@ -12,10 +12,11 @@ set -e set -u pkg_cmd_name="gitea" -pkg_common_opt="$HOME/.local" +pkg_dst="$HOME/.local" -# just a junk file so that the version check always fails for non-current versions -pkg_new_opt="$HOME/.local/opt/gitea-doesntexist111" +# 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" pkg_get_current_version() { # 'gitea version' has output in this format: @@ -31,7 +32,7 @@ pkg_format_cmd_version() { echo "$pkg_cmd_name v$my_version" } -pkg_link_new_version() { +pkg_link_src_dst() { # gitea is just a single file, no directory linking to do true } @@ -50,22 +51,22 @@ pkg_install() { # rename the entire extracted folder to the new location # (this will be "$HOME/.local/bin/gitea" by default) - mkdir -p "$pkg_common_bin" - mv ./"$pkg_cmd_name"* "$pkg_common_cmd" - chmod a+x "$pkg_common_cmd" + 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_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages # Adds "$HOME/.local/bin" to PATH - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" } pkg_post_install_message() { - echo "Installed 'gitea' as $pkg_common_cmd" + echo "Installed 'gitea' v$WEBI_VERSION as $pkg_dst_cmd" } diff --git a/golang/install.bash b/golang/install.bash index fead4b6..16a601f 100644 --- a/golang/install.bash +++ b/golang/install.bash @@ -43,8 +43,8 @@ pkg_cmd_name="go" # NOTE: pkg_* variables can be defined here # pkg_cmd_name -# pkg_new_opt, pkg_new_bin, pkg_new_cmd -# pkg_common_opt, pkg_common_bin, pkg_common_cmd +# pkg_src, pkg_src_bin, pkg_src_cmd +# pkg_dst, pkg_dst_bin, pkg_dst_cmd # # Their defaults are defined in webi/template.bash at https://github.com/webinstall/packages @@ -62,11 +62,11 @@ pkg_format_cmd_version() { echo "${pkg_cmd_name}${my_version}" } -pkg_link_new_version() { - # 'pkg_common_opt' will default to $HOME/.local/opt/go - # 'pkg_new_opt' will be the installed version, such as to $HOME/.local/opt/go-v1.14.2 - rm -rf "$pkg_common_opt" - ln -s "$pkg_new_opt" "$pkg_common_opt" +pkg_link_src_dst() { + # 'pkg_dst' will default to $HOME/.local/opt/go + # 'pkg_src' will be the installed version, such as to $HOME/.local/opt/go-v1.14.2 + rm -rf "$pkg_dst" + ln -s "$pkg_src" "$pkg_dst" # Go has a special $GOBIN @@ -97,30 +97,30 @@ pkg_install() { pushd "$WEBI_TMP" 2>&1 >/dev/null # remove the versioned folder, just in case it's there with junk - rm -rf "$pkg_new_opt" + rm -rf "$pkg_src" # rename the entire extracted folder to the new location # (this will be "$HOME/.local/opt/go-v$WEBI_VERSION" by default) - mv ./"$pkg_cmd_name"* "$pkg_new_opt" + mv ./"$pkg_cmd_name"* "$pkg_src" popd 2>&1 >/dev/null } pkg_post_install() { - pkg_link_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages # Updates PATH with # "$HOME/.local/opt/go" - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" webi_path_add "$GOBIN/bin" # Install x go echo "Installing go extended tools (goimports, gorename, etc)" - "$pkg_common_cmd" get golang.org/x/tools/cmd/goimports > /dev/null 2>/dev/null - "$pkg_common_cmd" get golang.org/x/tools/cmd/gorename > /dev/null 2>/dev/null - "$pkg_common_cmd" get golang.org/x/tools/cmd/gotype > /dev/null 2>/dev/null - "$pkg_common_cmd" get golang.org/x/tools/cmd/stringer > /dev/null 2>/dev/null + "$pkg_dst_cmd" get golang.org/x/tools/cmd/goimports > /dev/null 2>/dev/null + "$pkg_dst_cmd" get golang.org/x/tools/cmd/gorename > /dev/null 2>/dev/null + "$pkg_dst_cmd" get golang.org/x/tools/cmd/gotype > /dev/null 2>/dev/null + "$pkg_dst_cmd" get golang.org/x/tools/cmd/stringer > /dev/null 2>/dev/null } pkg_post_install_message() { diff --git a/hugo/install.bash b/hugo/install.bash index 6e3c108..1fe55ef 100644 --- a/hugo/install.bash +++ b/hugo/install.bash @@ -16,10 +16,11 @@ set -e set -u pkg_cmd_name="hugo" -pkg_common_opt="$HOME/.local" +pkg_dst="$HOME/.local" -# just a junk file so that the version check always fails for non-current versions -pkg_new_opt="$HOME/.local/opt/hugo-doesntexist111" +# 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" pkg_get_current_version() { # 'hugo version' has output in this format: @@ -35,7 +36,7 @@ pkg_format_cmd_version() { echo "$pkg_cmd_name v$my_version" } -pkg_link_new_version() { +pkg_link_src_dst() { # hugo is just a single file, no directory linking to do true } @@ -54,18 +55,18 @@ pkg_install() { # rename the entire extracted folder to the new location # (this will be "$HOME/.local/opt/node-v$WEBI_VERSION" by default) - mkdir -p "$pkg_common_bin" - mv ./"$pkg_cmd_name"* "$pkg_common_cmd" - chmod a+x "$pkg_common_cmd" + 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_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages # Adds "$HOME/.local/opt/node" to PATH - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" } diff --git a/node/install.bash b/node/install.bash index 38b842f..e65662b 100644 --- a/node/install.bash +++ b/node/install.bash @@ -93,11 +93,11 @@ pkg_format_cmd_version() { echo "$pkg_cmd_name v$my_version" } -pkg_link_new_version() { - # 'pkg_common_opt' will default to $HOME/.local/opt/node - # 'pkg_new_opt' will be the installed version, such as to $HOME/.local/opt/node-v12.8.0 - rm -rf "$pkg_common_opt" - ln -s "$pkg_new_opt" "$pkg_common_opt" +pkg_link_src_dst() { + # 'pkg_dst' will default to $HOME/.local/opt/node + # 'pkg_src' will be the installed version, such as to $HOME/.local/opt/node-v12.8.0 + rm -rf "$pkg_dst" + ln -s "$pkg_src" "$pkg_dst" } pkg_pre_install() { @@ -117,31 +117,31 @@ pkg_install() { pushd "$WEBI_TMP" 2>&1 >/dev/null # remove the versioned folder, just in case it's there with junk - rm -rf "$pkg_new_opt" + rm -rf "$pkg_src" # rename the entire extracted folder to the new location # (this will be "$HOME/.local/opt/node-v$WEBI_VERSION" by default) # ex (full directory): ./node-v13-linux-amd64/bin/node.exe - mv ./"$pkg_cmd_name"* "$pkg_new_opt" + mv ./"$pkg_cmd_name"* "$pkg_src" # ex (single file): ./caddy-v13-linux-amd64.exe - #mv ./"$pkg_cmd_name"* "$pkg_common_cmd" - #chmod a+x "$pkg_common_cmd" + #mv ./"$pkg_cmd_name"* "$pkg_dst_cmd" + #chmod a+x "$pkg_dst_cmd" # ex (single file, nested in directory): ./rg/rg-v13-linux-amd64 #mv ./"$pkg_cmd_name"*/"$pkg_cmd_name"* "$pkg_commend_cmd" - #chmod a+x "$pkg_common_cmd" + #chmod a+x "$pkg_dst_cmd" popd 2>&1 >/dev/null } pkg_post_install() { - pkg_link_new_version + pkg_link_src_dst # web_path_add is defined in webi/template.bash at https://github.com/webinstall/packages # Adds "$HOME/.local/opt/node/bin" to PATH - webi_path_add "$pkg_common_bin" + webi_path_add "$pkg_dst_bin" } pkg_post_install_message() { diff --git a/webi/template.bash b/webi/template.bash index b1f3639..ec74355 100644 --- a/webi/template.bash +++ b/webi/template.bash @@ -52,23 +52,23 @@ webi_check() { pkg_current_version="$(pkg_get_current_version)" # remove trailing '.0's for golang's sake my_current_version="$(echo $pkg_current_version | sed 's:\.0::g')" - my_new_version="$(echo $WEBI_VERSION | sed 's:\.0::g')" + my_src_version="$(echo $WEBI_VERSION | sed 's:\.0::g')" if [ -n "$(command -v pkg_format_cmd_version)" ]; then my_canonical_name="$(pkg_format_cmd_version "$WEBI_VERSION")" else #my_canonical_name="$WEBI_NAME $WEBI_VERSION" my_canonical_name="$pkg_cmd_name v$WEBI_VERSION" fi - if [ "$my_new_version" == "$my_current_version" ]; then + if [ "$my_src_version" == "$my_current_version" ]; then echo "$my_canonical_name already installed at $my_current_cmd" exit 0 else - if [ "$my_current_cmd" != "$pkg_common_cmd" ]; then + if [ "$my_current_cmd" != "$pkg_dst_cmd" ]; then echo "WARN: possible conflict between $my_canonical_name and $pkg_current_version at $my_current_cmd" fi - if [ -x "$pkg_new_cmd" ]; then - pkg_link_new_version - echo "switched to $my_canonical_name at $pkg_new_opt" + if [ -x "$pkg_src_cmd" ]; then + pkg_link_src_dst + echo "switched to $my_canonical_name at $pkg_src" exit 0 fi fi @@ -168,17 +168,17 @@ webi_path_add() { if [ -n "$(command -v pkg_install)" ]; then pkg_cmd_name="${pkg_cmd_name:-$WEBI_NAME}" - pkg_common_opt="${pkg_common_opt:-$HOME/.local/opt/$pkg_cmd_name}" - pkg_common_bin="${pkg_common_bin:-$pkg_common_opt/bin}" - pkg_common_cmd="${pkg_common_cmd:-$pkg_common_bin/$pkg_cmd_name}" + pkg_dst="${pkg_dst:-$HOME/.local/opt/$pkg_cmd_name}" + pkg_dst_bin="${pkg_dst_bin:-$pkg_common/bin}" + pkg_dst_cmd="${pkg_dst_cmd:-$pkg_dst_bin/$pkg_cmd_name}" - pkg_new_opt="${pkg_new_opt:-$HOME/.local/opt/$pkg_cmd_name-v$WEBI_VERSION}" - pkg_new_bin="${pkg_new_bin:-$pkg_new_opt/bin}" - pkg_new_cmd="${pkg_new_cmd:-$pkg_new_bin/$pkg_cmd_name}" + pkg_src="${pkg_src:-$HOME/.local/opt/$pkg_cmd_name-v$WEBI_VERSION}" + pkg_src_bin="${pkg_src_bin:-$pkg_src/bin}" + pkg_src_cmd="${pkg_src_cmd:-$pkg_src_bin/$pkg_cmd_name}" [ -n "$(command -v pkg_pre_install)" ] && pkg_pre_install - echo "Installing '$pkg_cmd_name' v$WEBI_VERSION as $pkg_new_cmd" + echo "Installing '$pkg_cmd_name' v$WEBI_VERSION as $pkg_src_cmd" pkg_install [ -n "$(command -v pkg_post_install)" ] && pkg_post_install @@ -186,7 +186,7 @@ if [ -n "$(command -v pkg_install)" ]; then if [ -n "$(command -v pkg_post_install_message)" ]; then pkg_post_install_message else - echo "Installed '$pkg_cmd_name' v$WEBI_VERSION as $pkg_new_cmd" + echo "Installed '$pkg_cmd_name' v$WEBI_VERSION as $pkg_src_cmd" fi echo "" fi