From d61d0845994755555f1e8a9e8c3ff7fe6ea839af Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Fri, 29 Jun 2012 13:33:14 -0400 Subject: [PATCH] postrm update --- rakefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rakefile b/rakefile index dff41fbe4e..74e1da4505 100644 --- a/rakefile +++ b/rakefile @@ -114,17 +114,15 @@ task :package do Dir.chdir(BUILD_DIR) do afterremove = Tempfile.new('afterremove') afterremove.write <<-AFTERREMOVE.gsub(/^\s*/, '') - #! /bin/sh + #! /bin/bash set -e set -x # to be a little safer this rm is executed - # as the makeitso user and is careful - # about what it removes + # as the makeitso user - if [ -d #{INSTALL_DIR_PATH} ]; then - sudo -u makeitso rm -rf #{INSTALL_DIR_PATH}/{common,cms,lms,*.pyc} - sudo -u makeitso rmdir #{INSTALL_DIR_PATH} + if [[ -d "#{INSTALL_DIR_PATH}" ]]; then + sudo -u makeitso rm -rf "#{INSTALL_DIR_PATH}" fi AFTERREMOVE