You are not logged in.
i am creating a pkgbuild file to install fonts for a program called magic set editor, i have downloaded the main program to get the fonts. when the pkgbuild tries to cd into the folder it can not find it, even though i have checked the folder exist within the src folder. the exact cd command is "cd $srcdir/Full-Magic-Pack-main/Magic - Fonts/" i have tried backslashing before the spaces but that did not work,i have also tried single quotes to see if that made any difference but that also did not work. what am i missing?
Offline
are the cases correct? In general
cd "$srcdir/Full-Magic-Pack-main/Magic - Fonts/"should avoid most of the normal space/quoting gotchas.
Maybe post the full dir tree/output of an ls or so and the actual error message/build log/PKGBUILD for proper diagnostics instead of hearsay.
Offline
i just tried it but that still did not work here is the log
==> Making package: mse-fonts 1.0.0-1 (Fri 01 Oct 2021 12:25:24 PM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found Full-Magic-Pack-main.zip
==> Validating source files with sha256sums...
Full-Magic-Pack-main.zip ... Skipped
==> Extracting sources...
-> Extracting Full-Magic-Pack-main.zip with bsdtar
==> Removing existing $pkgdir/ directory...
==> Entering fakeroot environment...
==> Starting package()...
mkdir: cannot create directory ‘packages/pkg/mse-fonts/usr/share/fonts/mse/’: No such file or directory
==> ERROR: A failure occurred in package().
Aborting...
and here is the pkgbuild
package()
{
cd "$srcdir/Full-Magic-Pack-main/Magic - Fonts/"
mkdir $pkgdir/usr/share/fonts/mse/
cp ProgressEngine.otf $pkgdir/usr/share/fonts/mse
cp *.ttf $pkgdir/usr/share/fonts/mse
cd "/template specific fonts/"
cp * $pkgdir/usr/share/fonts/mse
}
Offline
The error clearly says 'mkdir' is the problem, not 'cd'. And the problem is you cannot create many levels of non-existing directory like that ... add the -p flag to mkdir, then read the mkdir man page (or better yet, do those in the opposite order).
Or better yet, read the `install` man page, and kill two (or three or four) birds with one stone.
Last edited by Trilby (2021-10-01 16:36:24)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
i think i may have just found my problem i forgot to add -p to the mkdir.
Offline
Wrap outputs in code Tags
It doesn't fail on the cd but on the mkdir, you probably want to use mkdir -p to generate the entire tree.
Edit: Whoops
Last edited by V1del (2021-10-01 16:38:38)
Offline
yeah i think what happen is i originally got the problem with the cd and fixed it but i kept seeing error so i thought it was the same error, it wasn't until i posted the error report that i noticed it had changed.
Offline