summaryrefslogtreecommitdiffstats
path: root/owncloud-delete-nonfree.sh
blob: fe6c53cbc68ddeeb8643f7363ba759baa5383497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash -e

SUFFIX=".tar.bz2"
ORIG_SOURCE=$1
REPACK_SOURCE="$(basename $ORIG_SOURCE $SUFFIX)-repack${SUFFIX}"

[ -d owncloud ] && rm -rf owncloud

tar -xf $1

# delete jslint
pushd owncloud/apps/files_texteditor/js/vendor/ace/src-noconflict/
sed -i '/^ \* JSHint, by JSHint Community\.$/,/^})()$/d' worker-javascript.js
popd

# delete minify entirely as it's a mess that contains at least one instance
# of JSMin, which is under the same problematic license as jslint
rm -rf owncloud/3rdparty/mrclay/minify

tar -cjf $REPACK_SOURCE owncloud
rm -rf owncloud