# 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"
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)
-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"
+ }
}
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));
});
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));
});