projects
/
webi-installers
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git]
/
powershell
/
install.sh
diff --git
a/powershell/install.sh
b/powershell/install.sh
index ac1a36c673faa7a83316ed824b65918e51fb7354..f243a4408c57a8d52611e213d71c50597574bbd4 100644
(file)
--- a/
powershell/install.sh
+++ b/
powershell/install.sh
@@
-1,8
+1,8
@@
#!/bin/bash
#!/bin/bash
+set -e
+set -u
-{
- set -e
- set -u
+function __init_powershell() {
pkg_cmd_name="pwsh"
# no ./bin prefix
pkg_cmd_name="pwsh"
# no ./bin prefix
@@
-14,7
+14,7
@@
# PowerShell 7.0.2
# This trims it down to just the version number:
# 7.0.2
# PowerShell 7.0.2
# This trims it down to just the version number:
# 7.0.2
- echo "$(pwsh --version 2>/dev/null | head -n 1 | cut -d' ' -f2)"
+ echo "$(pwsh --version 2>
/dev/null | head -n 1 | cut -d' ' -f2)"
}
pkg_install() {
}
pkg_install() {
@@
-23,9
+23,9
@@
mv ./* "$pkg_src"
# symlink powershell to pwsh
mv ./* "$pkg_src"
# symlink powershell to pwsh
- pushd "$pkg_src" >/dev/null
-
ln -s pwsh powershell
- popd >/dev/null
+ pushd "$pkg_src" >
/dev/null
+ ln -s pwsh powershell
+ popd >
/dev/null
}
pkg_link() {
}
pkg_link() {
@@
-40,3
+40,5
@@
echo "Installed 'pwsh' at $pkg_dst"
}
}
echo "Installed 'pwsh' at $pkg_dst"
}
}
+
+__init_powershell