Skip to content

Commit e44dcf8

Browse files
committed
add github-actions
1 parent a1ff05a commit e44dcf8

File tree

4 files changed

+79
-3
lines changed

4 files changed

+79
-3
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"

.github/workflows/make.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Make
3+
4+
on:
5+
push:
6+
branches:
7+
- "**"
8+
pull_request:
9+
branches:
10+
- master
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 120
20+
strategy:
21+
matrix:
22+
os:
23+
- ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
30+
- name: Build on Linux
31+
if: runner.os == 'Linux'
32+
shell: bash
33+
run: bash -x make.sh build

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ CopyCommander is a tool for windows/linux to use queued file-copy/moves from one
44

55
A manual can be found [here](src/how_to_use.txt)
66

7-
If you do not have Lazarus you can directly download a precompiled binary from:
8-
9-
https://www.corpsman.de/klickcounter.php?url=download/copycommander.zip
7+
If you do not have Lazarus you can directly download a precompiled binary [from](https://www.corpsman.de/klickcounter.php?url=download/copycommander.zip).
108

make.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
function priv_clippit
4+
(
5+
cat <<EOF
6+
Usage: bash ${0} [OPTIONS]
7+
Options:
8+
build Build program
9+
EOF
10+
)
11+
12+
function pub_build
13+
(
14+
find 'src' -type 'f' -name '*.lpi' -exec lazbuild --recursive --build-mode=release {} \;
15+
)
16+
17+
function priv_main
18+
(
19+
set -euo pipefail
20+
if ! (which lazbuild); then
21+
source '/etc/os-release'
22+
case ${ID:?} in
23+
debian | ubuntu)
24+
sudo apt-get update
25+
sudo apt-get install -y lazarus
26+
;;
27+
esac
28+
fi
29+
if ((${#})); then
30+
case ${1} in
31+
build) pub_build 1>&2 ;;
32+
esac
33+
else
34+
priv_clippit
35+
fi
36+
)
37+
38+
priv_main "${@}" >/dev/null

0 commit comments

Comments
 (0)