Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gershomb
ghcup
Commits
36e8389b
Unverified
Commit
36e8389b
authored
5 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Tweak ghcup upgrade
1. add --inplace flag 2. by default install into BIN_LOCATION
parent
ae99de58
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghcup
+10
-3
10 additions, 3 deletions
ghcup
with
10 additions
and
3 deletions
ghcup
+
10
−
3
View file @
36e8389b
...
@@ -269,10 +269,12 @@ USAGE:
...
@@ -269,10 +269,12 @@ USAGE:
${
SCRIPT
}
upgrade [FLAGS] [TARGET-LOCATION]
${
SCRIPT
}
upgrade [FLAGS] [TARGET-LOCATION]
FLAGS:
FLAGS:
-i, --inplace Update this script in-place (wherever it's at)
-h, --help Prints help information
-h, --help Prints help information
ARGS:
ARGS:
[TARGET-LOCATION] Where to place the updated script (defaults to directory of the script).
[TARGET-LOCATION] Where to place the updated script (defaults to
${
BIN_LOCATION
}
).
This is ignored if --inplace is issued as well.
"
)
"
)
exit
1
exit
1
}
}
...
@@ -1885,18 +1887,23 @@ while [ $# -gt 0 ] ; do
...
@@ -1885,18 +1887,23 @@ while [ $# -gt 0 ] ; do
break
;;
break
;;
upgrade
)
upgrade
)
IN_PLACE
=
false
shift
1
shift
1
while
[
$#
-gt
0
]
;
do
while
[
$#
-gt
0
]
;
do
case
$1
in
case
$1
in
-h
|
--help
)
upgrade_usage
;;
-h
|
--help
)
upgrade_usage
;;
-i
|
--inplace
)
IN_PLACE
=
true
shift
1
;;
*
)
TARGET_LOCATION
=
$1
*
)
TARGET_LOCATION
=
$1
break
;;
break
;;
esac
esac
done
done
if
[
-n
"
${
TARGET_LOCATION
}
"
]
;
then
if
${
IN_PLACE
}
;
then
upgrade
"
$(
dirname
"
$(
posix_realpath
"
${
SOURCE
}
"
)
"
)
"
elif
[
-n
"
${
TARGET_LOCATION
}
"
]
;
then
upgrade
"
${
TARGET_LOCATION
}
"
upgrade
"
${
TARGET_LOCATION
}
"
else
else
upgrade
"
$
(
dirname
"
$(
posix_realpath
"
${
SOURCE
}
"
)
"
)
"
upgrade
"
$
{
BIN_LOCATION
}
"
fi
fi
break
;;
break
;;
show
)
show
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment