From 03045ff2ec2962616843fcbcb5cc977ec22368d1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 16 Aug 2016 13:02:06 +0200 Subject: [PATCH] Delete ~/rpmbuild entirely before creating a rpm package --- script/lib/create-rpm-package.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/lib/create-rpm-package.js b/script/lib/create-rpm-package.js index 13b957892..dffd3ec5c 100644 --- a/script/lib/create-rpm-package.js +++ b/script/lib/create-rpm-package.js @@ -37,12 +37,13 @@ module.exports = function (packagedAppPath) { const rpmPackageApplicationDirPath = path.join(rpmPackageBuildDirPath, appName) const rpmPackageIconsDirPath = path.join(rpmPackageBuildDirPath, 'icons') - if (fs.existsSync(rpmPackageBuildDirPath)) { - console.log(`Deleting existing rpm build directory at "${rpmPackageBuildDirPath}"`) - fs.removeSync(rpmPackageBuildDirPath) + if (fs.existsSync(rpmPackageDirPath)) { + console.log(`Deleting existing rpm build directory at "${rpmPackageDirPath}"`) + fs.removeSync(rpmPackageDirPath) } console.log(`Creating rpm package directory structure at "${rpmPackageDirPath}"`) + fs.mkdirpSync(rpmPackageDirPath) fs.mkdirpSync(rpmPackageBuildDirPath) fs.mkdirpSync(rpmPackageSourcesDirPath) fs.mkdirpSync(rpmPackageSpecsDirPath)