Skip to content

Commit

Permalink
Try setting paths correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rianadon committed Jan 1, 2024
1 parent dbf6ef0 commit fce757c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/model_gen/download-openscad.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { execFileSync, spawnSync } from 'child_process'
import { accessSync, constants, createWriteStream, existsSync, linkSync, lstatSync, readdirSync, rmSync } from 'fs'
import { accessSync, constants, createWriteStream, existsSync, linkSync, lstatSync, readdirSync, rmSync, writeFileSync } from 'fs'
import { join } from 'path'
import * as readline from 'readline/promises'
import { Readable } from 'stream'
Expand Down Expand Up @@ -133,8 +133,14 @@ async function main() {
encoding: 'utf-8',
cwd: targetDir,
}))
rmSync(destination)
linkOpenSCAD(join(targetDir, 'squashfs-root/AppRun'))
writeFileSync(
destination,
`#!/bin/sh
SELF=$(readlink -f "$0")
HERE=\${SELF%/*}
exec $HERE/squashfs-root/AppRun "$@"
`,
)
}
}

Expand Down

0 comments on commit fce757c

Please sign in to comment.