-
Notifications
You must be signed in to change notification settings - Fork 0
Fix subshell variable bugs and optimize build performance #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,15 +17,15 @@ chmod 444 "${MODELFILE}" | |
| cat > /usr/local/bin/luminos-reassemble.sh << "EOF" | ||
| #!/bin/bash | ||
| # Find files marked as split | ||
| find /usr/share/ollama/.ollama -name "*.is_split" | while read marker; do | ||
| while IFS= read -r -d '' marker; do | ||
| ORIG_FILE="${marker%.is_split}" | ||
| if [ ! -f "$ORIG_FILE" ]; then | ||
| echo "Reassembling $ORIG_FILE..." | ||
| # Combine parts .partaa, .partab... | ||
| cat "${ORIG_FILE}.part"* > "$ORIG_FILE" | ||
| chown ollama:ollama "$ORIG_FILE" | ||
| fi | ||
| done | ||
| done < <(find /usr/share/ollama/.ollama -name "*.is_split" -print0) | ||
|
Comment on lines
+20
to
+28
|
||
| EOF | ||
| chmod +x /usr/local/bin/luminos-reassemble.sh | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable PACKAGES_TO_REMOVE should be quoted when used in apt-get purge to handle potential edge cases properly. While the current package names don't contain special characters, proper quoting is a shell scripting best practice that prevents word splitting issues.
Change to: apt-get purge -y "$PACKAGES_TO_REMOVE" || true