Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qbar
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
jktr
qbar
Commits
9450dbb6
Commit
9450dbb6
authored
5 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Unify scripts, use readonly and set -e/-u
parent
f1663d49
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/install
+22
-0
22 additions, 0 deletions
bin/install
bin/run
+3
-2
3 additions, 2 deletions
bin/run
bin/run-sway
+10
-9
10 additions, 9 deletions
bin/run-sway
install
+0
-18
0 additions, 18 deletions
install
with
35 additions
and
29 deletions
bin/install
0 → 100755
+
22
−
0
View file @
9450dbb6
#!/bin/sh
set
-e
set
-u
readonly
executable_name
=
qbar
readonly
local_bin
=
`
stack path
--local-bin
`
readonly
executable_path
=
$local_bin
/
$executable_name
stack
install
echo
>
&2
if
[
-n
"
${
LOCAL_ZSH_COMPLETION_PATH
+set
}
"
-a
-d
"
$LOCAL_ZSH_COMPLETION_PATH
"
]
then
ZSH_COMPLETION_SCRIPT_PATH
=
$LOCAL_ZSH_COMPLETION_PATH
/_
$executable_name
$executable_path
--zsh-completion-script
$executable_path
>
$ZSH_COMPLETION_SCRIPT_PATH
echo
"Installed zsh completions for
$executable_name
to
$ZSH_COMPLETION_SCRIPT_PATH
"
>
&2
else
echo
"Not installing completions, set LOCAL_ZSH_COMPLETION_PATH to install them."
>
&2
fi
This diff is collapsed.
Click to expand it.
bin/run
+
3
−
2
View file @
9450dbb6
#!/bin/sh
set
-e
set
-u
EXECUTABLE_NAME
=
qbar
readonly
executable_name
=
qbar
stack build
&&
stack
exec
$
EXECUTABLE_NAME
--
"
$@
"
stack build
&&
stack
exec
$
executable_name
--
"
$@
"
This diff is collapsed.
Click to expand it.
bin/run-sway
+
10
−
9
View file @
9450dbb6
#!/bin/sh
set
-e
set
-u
DEFAULT_BAR_COMMAND
=
"qbar server"
EXECUTABLE_NAME
=
qbar
SWAY_BAR_ID
=
bar-0
readonly
default_bar_command
=
"qbar server"
readonly
executable_name
=
qbar
readonly
sway_bar_id
=
bar-0
stack build
TEMP_DIR
=
$(
mktemp
-d
)
STDERR
=
$TEMP_DIR
/stderr
mkfifo
$
STDERR
readonly
temp_dir
=
$(
mktemp
-d
)
readonly
stderr
=
$temp_dir
/stderr
mkfifo
$
stderr
trap
"swaymsg bar
$
SWAY_BAR_ID
status_command
$
DEFAULT_BAR_COMMAND
; rm -rf
$
TEMP_DIR
"
EXIT INT HUP TERM
trap
"swaymsg bar
$
sway_bar_id
status_command
$
default_bar_command
; rm -rf
$
temp_dir
"
EXIT INT HUP TERM
swaymsg bar
$
SWAY_BAR_ID
status_command
"exec
$(
stack path
--local-install-root
)
/bin/
$
EXECUTABLE_NAME
$@
-- server 2>
$
STDERR
"
swaymsg bar
$
sway_bar_id
status_command
"exec
$(
stack path
--local-install-root
)
/bin/
$
executable_name
$@
-- server 2>
$
stderr
"
# show output and run forever (use Ctrl-C to stop)
cat
$
STDERR
cat
$
stderr
This diff is collapsed.
Click to expand it.
install
deleted
100755 → 0
+
0
−
18
View file @
f1663d49
#!/bin/sh
set
-e
EXECUTABLE_NAME
=
qbar
LOCAL_BIN
=
`
stack path
--local-bin
`
EXECUTABLE_PATH
=
$LOCAL_BIN
/
$EXECUTABLE_NAME
stack
install
if
[
-d
"
$LOCAL_ZSH_COMPLETION_PATH
"
]
;
then
ZSH_COMPLETION_SCRIPT_PATH
=
$LOCAL_ZSH_COMPLETION_PATH
/_
$EXECUTABLE_NAME
$EXECUTABLE_PATH
--zsh-completion-script
$EXECUTABLE_PATH
>
$ZSH_COMPLETION_SCRIPT_PATH
echo
echo
"Installed zsh completions for
$EXECUTABLE_NAME
to
$ZSH_COMPLETION_SCRIPT_PATH
"
;
fi
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