Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
csma-bash
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
csma
csma-bash
Commits
4390c67b
Commit
4390c67b
authored
1 year ago
by
Jonas Karlsson
Browse files
Options
Downloads
Patches
Plain Diff
POC
parent
5094ab1e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
csma-bash.sh
+16
-1
16 additions, 1 deletion
csma-bash.sh
scripts/hello.sh
+1
-3
1 addition, 3 deletions
scripts/hello.sh
scripts/world.sh
+2
-1
2 additions, 1 deletion
scripts/world.sh
with
19 additions
and
5 deletions
csma-bash.sh
+
16
−
1
View file @
4390c67b
#!/bin/bash
PROJECT_PATH
=
'https://git.cs.kau.se/api/v4/projects/csma%2Fbash/'
\ No newline at end of file
TREEP
=
'https://git.cs.kau.se/api/v4/projects/csma%2Fbash/repository/tree/?path=scripts'
FILEP
=
'https://git.cs.kau.se/api/v4/projects/csma%2Fbash/repository/files/scripts%2F'
scripts
=
$(
curl
--silent
${
TREEP
}
|jq
-r
.[].name
)
if
[[
$#
-eq
0
]]
;
then
echo
"Usage :
$0
cmd *args"
echo
"Available cmds:"
${
scripts
}
exit
1
fi
cmd
=
$1
shift
args
=
"
$@
"
#execute the script
curl
--silent
${
FILEP
}${
cmd
}
/raw?lfs
=
true
| bash
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/hello.sh
+
1
−
3
View file @
4390c67b
#!/bin/bash
cmd
=
$1
shift
1
args
=
"
$@
"
echo
"Hello executing
$cmd
with
$args
"
\ No newline at end of file
echo
"Hello with
$args
"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/world.sh
+
2
−
1
View file @
4390c67b
#!/bin/bash
echo
"World"
"
$@
"
\ No newline at end of file
args
=
"
$@
"
echo
"World with
$args
"
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