GWinWrap/python/src/debs/build.sh

40 lines
740 B
Bash

#!/bin/bash
# Fixes ownershp
function main() {
sudo find . -type f -exec chmod 644 {} +
sudo find . -type d -exec chmod 755 {} +
# Set postrm permissions
for i in `find . -name postrm`; do
sudo chmod 755 "${i}"
done
# Set gwinwrap permissions
for i in `find . -name gwinwrap`; do
sudo chmod 755 "${i}"
done
# Set xwinwrap permissions
for i in `find . -name xwinwrap`; do
sudo chmod 755 "${i}"
done
sudo chown -R root:root ./*/
builder;
bash ./chownAll.sh
}
#builds debs
function builder() {
for i in `ls`; do
if [[ -d "${i}" ]]; then
dpkg --build "${i}"
else
echo "Not a dir."
fi
done
}
main;