Skip to content

Commit

Permalink
Added CI step to check installed python files
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Feb 10, 2025
1 parent d540df0 commit a82bcd6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/install_ramalama.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ jobs:
run: |
chmod +x install.sh
sudo ./install.sh -l
- name: Verify RamaLama installation
run: |
install_dir=$(sudo ./install.sh get_installation_dir)
ls -f -A ramalama/ | while read file; do ls -f -A $install_dir | grep $file; done
- name: Ramalama info
run: |
ramalama info
Expand Down
21 changes: 12 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ check_platform() {
return 0
}

get_installation_dir() {
local sharedirs=("/opt/homebrew/share" "/usr/local/share" "/usr/share")
for dir in "${sharedirs[@]}"; do
if [ -d "$dir" ]; then
echo "$dir/ramalama"
break
fi
done
}

setup_ramalama() {
local binfile="ramalama"
local from_file="${binfile}"
Expand All @@ -114,13 +124,7 @@ setup_ramalama() {
download "$url" "$to_file"
local ramalama_bin="${1}/${binfile}"
local sharedirs=("/opt/homebrew/share" "/usr/local/share" "/usr/share")
local syspath
for dir in "${sharedirs[@]}"; do
if [ -d "$dir" ]; then
syspath="$dir/ramalama"
break
fi
done
local syspath=$(get_installation_dir)

$sudo install -m755 -d "$syspath"
syspath="$syspath/ramalama"
Expand Down Expand Up @@ -183,5 +187,4 @@ main() {
setup_ramalama "$bindir"
}

main "$@"

[[ -n $1 ]] && [[ $1 = get_* ]] && $1 || main "$@"

0 comments on commit a82bcd6

Please sign in to comment.