create_package.sh: quote variables
This commit is contained in:
parent
bac3b3c64b
commit
932b0c963e
2 changed files with 17 additions and 17 deletions
|
@ -24,13 +24,13 @@ trap 'rm -rf $tmpd' 0 INT EXIT
|
|||
mkdir -p "$sbindir" "$libexecdir" "$rcdir"
|
||||
|
||||
# stage service scripts
|
||||
install -U $pdir/rc.d/builder_web $rcdir/builder_web
|
||||
install -U "$pdir/rc.d/builder_web" "$rcdir/builder_web"
|
||||
|
||||
# stage app binaries
|
||||
install -U $bdir/builder-web $libexecdir/builder-web
|
||||
install -U "$bdir/builder-web" "$libexecdir/builder-web"
|
||||
|
||||
install -U $bdir/builder-migrations $sbindir/builder-migrations
|
||||
install -U $bdir/builder-db $sbindir/builder-db
|
||||
install -U "$bdir/builder-migrations" "$sbindir/builder-migrations"
|
||||
install -U "$bdir/builder-db" "$sbindir/builder-db"
|
||||
|
||||
# create +MANIFEST
|
||||
flatsize=$(find "$rootdir" -type f -exec stat -f %z {} + |
|
||||
|
@ -48,7 +48,7 @@ sed -e "s:%%FLATSIZE%%:${flatsize}:" -e "/^[Vv]ersion:/s/-/./g" "$pdir/MANIFEST"
|
|||
} | sed -e "s:${rootdir}::" >> "$manifest"
|
||||
|
||||
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=format:%ct)
|
||||
pkg create -r "$rootdir" -M "$manifest" -o $basedir/
|
||||
mv $basedir/builder-web-*.pkg $basedir/builder-web.pkg
|
||||
echo 'bin: [ "builder-web.pkg" ]' > $basedir/builder-web.install
|
||||
echo 'doc: [ "README.md" ]' >> $basedir/builder-web.install
|
||||
pkg create -r "$rootdir" -M "$manifest" -o "$basedir/"
|
||||
mv "$basedir/builder-web-*.pkg" "$basedir/builder-web.pkg"
|
||||
echo 'bin: [ "builder-web.pkg" ]' > "$basedir/builder-web.install"
|
||||
echo 'doc: [ "README.md" ]' >> "$basedir/builder-web.install"
|
||||
|
|
|
@ -26,17 +26,17 @@ install "$bdir/builder-migrations" "$sbindir/builder-migrations"
|
|||
install "$bdir/builder-db" "$sbindir/builder-db"
|
||||
|
||||
# service script
|
||||
install -m 0644 $basedir/packaging/debian/builder-web.service $systemddir/builder-web.service
|
||||
install -m 0644 "$basedir/packaging/debian/builder-web.service" "$systemddir/builder-web.service"
|
||||
|
||||
# install debian metadata
|
||||
install -m 0644 $basedir/packaging/debian/control $debiandir/control
|
||||
install -m 0644 $basedir/packaging/debian/changelog $debiandir/changelog
|
||||
install -m 0644 $basedir/packaging/debian/copyright $debiandir/copyright
|
||||
install $basedir/packaging/debian/postinst $debiandir/postinst
|
||||
install -m 0644 "$basedir/packaging/debian/control" "$debiandir/control"
|
||||
install -m 0644 "$basedir/packaging/debian/changelog" "$debiandir/changelog"
|
||||
install -m 0644 "$basedir/packaging/debian/copyright" "$debiandir/copyright"
|
||||
install "$basedir/packaging/debian/postinst" "$debiandir/postinst"
|
||||
|
||||
ARCH=$(dpkg-architecture -q DEB_TARGET_ARCH)
|
||||
sed -i -e "s/^Architecture:.*/Architecture: ${ARCH}/" $debiandir/control
|
||||
sed -i -e "s/^Architecture:.*/Architecture: ${ARCH}/" "$debiandir/control"
|
||||
|
||||
dpkg-deb --build $rootdir $basedir/builder-web.deb
|
||||
echo 'bin: [ "builder-web.deb" ]' > $basedir/builder-web.install
|
||||
echo 'doc: [ "README.md" ]' >> $basedir/builder-web.install
|
||||
dpkg-deb --build "$rootdir" "$basedir/builder-web.deb"
|
||||
echo 'bin: [ "builder-web.deb" ]' > "$basedir/builder-web.install"
|
||||
echo 'doc: [ "README.md" ]' >> "$basedir/builder-web.install"
|
||||
|
|
Loading…
Reference in a new issue