File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ jobs:
41
41
run : |
42
42
mkdir cyrus
43
43
cp ./target/release/cyrus ./cyrus
44
+ cp ./scripts/install.sh ./cyrus
44
45
cp -r ./stdlib ./cyrus
45
46
46
47
- name : Upload as artifact
47
48
uses : actions/upload-artifact@v4
48
49
with :
49
50
name : cyrus
50
51
path : ./cyrus
51
- compression-level : 0
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Define installation path
4
+ INSTALL_DIR=" /usr/bin"
5
+ EXECUTABLE_NAME=" cyrus"
6
+ SOURCE_PATH=" ./cyrus"
7
+
8
+ # Check if running as root
9
+ if [[ $EUID -ne 0 ]]; then
10
+ echo " Please run this script as root or use sudo."
11
+ exit 1
12
+ fi
13
+
14
+ if [[ ! -f " $SOURCE_PATH " ]]; then
15
+ echo " Error: '$SOURCE_PATH ' not found. Make sure the Cyrus binary is exists in this directory."
16
+ exit 1
17
+ fi
18
+
19
+ cp " $SOURCE_PATH " " $INSTALL_DIR /$EXECUTABLE_NAME "
20
+
21
+ chmod +x " $INSTALL_DIR /$EXECUTABLE_NAME "
22
+
23
+ if command -v " $EXECUTABLE_NAME " & > /dev/null; then
24
+ echo " Cyrus has been installed successfully!"
25
+ echo " "
26
+ echo " You can now run 'cyrus' from anywhere."
27
+ echo " "
28
+ echo " Quick Usage:"
29
+ echo " - Check version: cyrus version"
30
+ echo " - Show help: cyrus help"
31
+ echo " "
32
+ echo " Happy coding with Cyrus Lang! 👾"
33
+ else
34
+ echo " Installation failed."
35
+ exit 1
36
+ fi
You can’t perform that action at this time.
0 commit comments