minor cleanup

This commit is contained in:
AJ ONeal
2020-07-03 06:20:00 +00:00
parent 84965a2207
commit 94becf0eae
4 changed files with 24 additions and 21 deletions
+3 -4
View File
@@ -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
View File
@@ -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"
}
}
+1
View File
@@ -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));
});
+1
View File
@@ -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));
});