-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFish-or-PowerShell.ps1
More file actions
executable file
·26 lines (21 loc) · 1.05 KB
/
Fish-or-PowerShell.ps1
File metadata and controls
executable file
·26 lines (21 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/local/bin/fish
# This file has a fish section followed by a powershell section,
# as well as shared sections.
echo @'
' > /dev/null
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# Fish Start ---------------------------------------------------------------
set scriptdir (status current-filename)
echo fish script is running from $scriptdir
# Above this line is fish Script -------------------------------------------
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
echo \
'@ | out-null
#vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# Below this line is Powershell Script -------------------------------------
$scriptdir=$PSScriptRoot
"powershell. Script is running from $scriptdir"
# Above this line is Powershell Script -------------------------------------
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
out-null `' > /dev/null
echo "Some lines work in both bash and powershell. Calculating scriptdir=$scriptdir, requires separate sections."