Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Better
Better
Commits
9c0e7d65
Unverified
Commit
9c0e7d65
authored
Aug 23, 2018
by
Aral Balkan
Browse files
Change indent function to work on Linux
parent
4b196aba
Changes
1
Hide whitespace changes
Inline
Side-by-side
install
View file @
9c0e7d65
...
...
@@ -202,13 +202,11 @@ runIn(){
}
#
#
Runs the passed command, formatting the output with the passed indentation (default: 4 spaces)
#
Pipe commands to this function to indent their output.
#
indentOutput
(){
commandToRun
=
$1
indentation
=
${
2
:-
' '
}
script
-q
/dev/null
$1
|
LC_ALL
=
C
sed
"s/^/
${
indentation
}
· /g"
indent
()
{
indentation
=
${
1
:-
' '
}
;
sed
"s/^/
${
indentation
}
· /"
;
}
#
...
...
@@ -250,7 +248,7 @@ install(){
echo
-e
"
\n
• Running installation script for
${
humanName
}
…"
cd
$componentToInstall
indentOutput
"./install"
' '
./install | indent
' '
cd
..
# Check that the installation completed successfully
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment