File: decompress.sh

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (22 lines) | stat: -rwxr-xr-x 439 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

cd $w_wims_home/$w_wims_sesdir
cldir=$w_wims_home/log/classes/$w_wims_class

rm -Rf upload 2>/dev/null
mkdir -p upload
cd upload
mv ../user-deposit $w_wims_deposit

if [ $w_format = zip ]; then
 unzip $w_wims_deposit
fi

if [ $w_format = tgz ] || [ $w_format = tar.gz ]; then
 tar -xzf $w_wims_deposit
fi

rm -f $w_wims_deposit
find . ! \( -type f -o -type d \) -exec rm -f '{}' \;
find . -type f -exec chmod a-x,og-w '{}' \;