From 8b4c84e8383a7981e09588436e3bcf380a1cccf2 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 8 Mar 2018 10:44:42 -0600 Subject: [PATCH] 3rdparty/unbootstrap: Correct source packages as well --- 3rdparty/pulkomandy/unbootstrap.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/3rdparty/pulkomandy/unbootstrap.sh b/3rdparty/pulkomandy/unbootstrap.sh index ff8517223e..4659ad12dd 100755 --- a/3rdparty/pulkomandy/unbootstrap.sh +++ b/3rdparty/pulkomandy/unbootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Convert _bootstrap packages to non-bootstrap version. # THIS IS A HACK. The _bootstrap packages are cross-compiled on a pseudo-haiku # environment running on a different host system. Expect binary @@ -20,6 +20,17 @@ do echo Converting .PackageInfo... sed -i .PackageInfo -e s/_bootstrap//g name=`basename $package|sed -e s/_bootstrap//g` + # If this is a source package, we need to correct the source directory. + if [[ $name = *"-source.hpkg" ]]; then + oldpkgname=$(basename $package | sed -e s/-source.hpkg//g | sed -e s/_source//g) + newpkgname=$(echo $name | sed -e s/-source.hpkg//g | sed -e s/_source//g) + if [[ -d develop/sources/$oldpkgname ]]; then + echo "Fixing source directory..." + mv develop/sources/$oldpkgname develop/sources/$newpkgname; + else + echo "WARN: Want to fix source directory, but develop/sources/$oldpkgname missing!" + fi + fi echo Regenerating package... package create ../$name done