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
Simon Schürg
actl
Commits
4b9cb684
Commit
4b9cb684
authored
Jun 09, 2021
by
Simon Schürg
🚀
Browse files
feat(scripts): add script to install from source
parent
d17414fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/before_build.sh
View file @
4b9cb684
...
...
@@ -28,5 +28,5 @@ go run actl.go docs
mkdir
./completions
go run actl.go completion bash
>
./completions/actl.bash
go run actl.go completion zsh
>
./completions/actl.zsh
go run actl.go completion fish
>
./completions/actl.fish
go run actl.go completion zsh
>
./completions/actl.zsh
bin/install_from_source.sh
0 → 100755
View file @
4b9cb684
#!/usr/bin/env bash
#
#
# Simon Schürg <simon@schuerg.net>
# Exit on error. Append "|| true" if you expect an error.
set
-o
errexit
# Exit on error inside any functions or subshells.
set
-o
errtrace
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
set
-o
nounset
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip`
set
-o
pipefail
# Turn on traces, useful while debugging but commented out by default
# set -o xtrace
# Set magic variables for current file, directory, os, etc.
__dir
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
__file
=
"
${
__dir
}
/
$(
basename
"
${
BASH_SOURCE
[0]
}
"
)
"
__base
=
"
$(
basename
"
${
__file
}
"
.sh
)
"
# cd in the project root
cd
"
${
__dir
}
/.."
BUILD_DIR
=
$(
mktemp
-d
)
go build
-o
${
BUILD_DIR
}
/actl actl.go
cd
${
BUILD_DIR
}
./actl docs
sudo cp
docs/man/
*
/usr/share/man/man3
sudo
sh
-c
'./actl completion bash > /usr/share/bash-completion/completions/actl'
sudo
sh
-c
'./actl completion fish > /usr/share/zsh/site-functions/_actl'
sudo
sh
-c
'./actl completion zsh > /usr/share/fish/completions/actl.fish'
sudo mv
${
BUILD_DIR
}
/actl /usr/local/bin/actl
cd
"
${
__dir
}
/.."
sudo mkdir
--verbose
-p
/etc/actl
# Copy if not exists, do not overwrite
sudo cp
--verbose
--no-clobber
actl.toml /etc/actl/actl.toml
Write
Preview
Supports
Markdown
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