From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 From: "Sergey Y. Afonin" To: ALT Linux Team development discussions Date: Thu, 6 May 2010 15:51:24 +0400 User-Agent: KMail/1.9.10 References: <20100506105631.GA20088@mw.office.seiros.ru> In-Reply-To: <20100506105631.GA20088@mw.office.seiros.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <201005061551.24763.asy@altlinux.ru> Subject: Re: [devel] upgrade directory to symlink X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 11:51:36 -0000 Archived-At: List-Archive: List-Post: On Thursday 06 May 2010, Денис Смирнов wrote: > MSG> [ -d %_datadir/hello ] && rm -rf %_datadir/hello > > И, наверное, стоит еще проверять версию пакета, и делать такое только при > обновлении. Не надо, надо просто проверить, что оно каталог, а не симлинк. Как-то так, что ли: [ -d %_datadir/hello ] && { [ -L %_datadir/hello ] || mv %_datadir/hello %_datadir/hello.bak } -- С уважением, Сергей Афонин asy@altlinux.ru