Commit cbf10a0a authored by Claudio Valerio's avatar Claudio Valerio

debian package owner is now root

parent ecf7c7b7
...@@ -19,6 +19,15 @@ ...@@ -19,6 +19,15 @@
# functions # functions
#********************** #**********************
checkUser()
{
if [ `id -u` -ne 0 ]; then
echo "Please run the script as root, may be using fakeroot command as follow"
echo "fakeroot ./buildDebianPackage.sh [options]"
exit 1
fi
}
initializeVariables() initializeVariables()
{ {
MAKE_TAG=true MAKE_TAG=true
...@@ -120,6 +129,7 @@ buildWithStandardQt(){ ...@@ -120,6 +129,7 @@ buildWithStandardQt(){
#********************** #**********************
# script # script
#********************** #**********************
checkUser
initializeVariables initializeVariables
buildWithStandardQt buildWithStandardQt
...@@ -375,12 +385,13 @@ chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint" ...@@ -375,12 +385,13 @@ chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint"
mkdir -p "install/linux" mkdir -p "install/linux"
DEBIAN_PACKAGE_NAME="Open-Sankore_${VERSION}_$ARCHITECTURE.deb" DEBIAN_PACKAGE_NAME="Open-Sankore_${VERSION}_$ARCHITECTURE.deb"
fakeroot chown -R root:root $BASE_WORKING_DIR chown -R root:root $BASE_WORKING_DIR
dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME" dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME"
notifyProgress "Open-Sankore" "Package built"
#clean up mess #clean up mess
fakeroot rm -rf $BASE_WORKING_DIR rm -rf $BASE_WORKING_DIR
notifyProgress "Open-Sankore" "Package built"
if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then
...@@ -392,3 +403,4 @@ if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then ...@@ -392,3 +403,4 @@ if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then
notifyProgress "Open-Sankore" "Build Diena zip file for distribution" notifyProgress "Open-Sankore" "Build Diena zip file for distribution"
fi fi
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment