mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-20 04:26:25 +00:00
minor cleanup
This commit is contained in:
+3
-4
@@ -18,14 +18,13 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERS
|
||||
# Enter opt
|
||||
pushd .local\tmp
|
||||
|
||||
echo "Remove leftover node-v* stuffs"
|
||||
# Remove any leftover tmp cruft
|
||||
Remove-Item -Path "node-v*" -Recurse -ErrorAction Ignore
|
||||
|
||||
# Unpack archive
|
||||
# Windows BSD-tar handles zip. Imagine that.
|
||||
echo "Unpacking $Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"
|
||||
& tar xf "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"
|
||||
Get-ChildItem "node-v*"
|
||||
|
||||
# Settle unpacked archive into place
|
||||
echo "New Name: $Env:PKG_NAME-v$Env:WEBI_VERSION"
|
||||
@@ -37,8 +36,8 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERS
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Versioning $Env:PKG_NAME"
|
||||
Remove-Item -Path "$Env:USERPROFILE\.local\opt\node" -Recurse -ErrorAction Ignore
|
||||
echo "Copying into '$Env:USERPROFILE\.local\opt\$Env:PKG_NAME' from '$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION'"
|
||||
Remove-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME" -Recurse -ErrorAction Ignore
|
||||
Copy-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME" -Recurse
|
||||
|
||||
# make npm not act stupid about which node to use... ugh (this should be the default)
|
||||
|
||||
+19
-17
@@ -1,24 +1,26 @@
|
||||
set -e
|
||||
set -u
|
||||
{
|
||||
set -e
|
||||
set -u
|
||||
|
||||
###################
|
||||
# Install ripgrep #
|
||||
###################
|
||||
###################
|
||||
# Install ripgrep #
|
||||
###################
|
||||
|
||||
new_rg="${HOME}/.local/bin/rg"
|
||||
WEBI_SINGLE=true
|
||||
new_rg="${HOME}/.local/bin/rg"
|
||||
WEBI_SINGLE=true
|
||||
|
||||
pkg_get_current_version() {
|
||||
echo $(rg --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)
|
||||
}
|
||||
pkg_get_current_version() {
|
||||
echo $(rg --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)
|
||||
}
|
||||
|
||||
pkg_install() {
|
||||
# $HOME/.local/xbin
|
||||
mkdir -p "$pkg_src_bin"
|
||||
pkg_install() {
|
||||
# $HOME/.local/xbin
|
||||
mkdir -p "$pkg_src_bin"
|
||||
|
||||
# mv ./ripgrep-*/rg "$HOME/.local/xbin/rg-v11.1.0"
|
||||
mv ./ripgrep-*/rg "$pkg_src_cmd"
|
||||
# mv ./ripgrep-*/rg "$HOME/.local/xbin/rg-v11.1.0"
|
||||
mv ./ripgrep-*/rg "$pkg_src_cmd"
|
||||
|
||||
# chmod a+x "$HOME/.local/xbin/rg-v11.1.0"
|
||||
chmod a+x "$pkg_src_cmd"
|
||||
# chmod a+x "$HOME/.local/xbin/rg-v11.1.0"
|
||||
chmod a+x "$pkg_src_cmd"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ module.exports = function (request) {
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
console.info(JSON.stringify(all));
|
||||
//console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ module.exports = function (request) {
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
console.info(JSON.stringify(all));
|
||||
//console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user