4
|
1
|
|
2 #+BEGIN_SRC sh
|
|
3 /home/petr/anaconda3/bin/planemo shed_init --name=repeatexplorer_utilities \
|
|
4 --owner=repeatexplorer \
|
|
5 --description="some utilities for data preprocessing" \
|
|
6 --long_description="some utilities for data preprocessing" \
|
|
7 --category="Fasta Manipulation"
|
|
8 #+END_SRC
|
|
9 # this create file .shed.yml
|
|
10
|
|
11
|
|
12 # create repository manualy:
|
|
13 #+BEGIN_SRC sh
|
|
14 planemo shed_build .
|
|
15 #+END_SRC
|
|
16
|
|
17 #+RESULTS:
|
|
18 : Created: /mnt/raid/users/petr/workspace/re_utilities.tar.gz
|
|
19
|
|
20 this creates archive: ../re_utilities.tar.gz
|
|
21 unecessary file from archive are deleted;
|
|
22
|
|
23 #+BEGIN_SRC bash :tangle clean_repository_tarball.sh
|
|
24 #!/bin/bash
|
|
25 containsElement () {
|
|
26 local e match="$1"
|
|
27 shift
|
|
28 for e; do [[ "$e" == "$match" ]] && return 0; done
|
|
29 return 1
|
|
30 }
|
|
31 ARCHIVE_GZ=../re_utilities.tar.gz
|
|
32 TMP_TAR=`mktemp`
|
|
33 echo $TMP_TAR
|
|
34 ARCHIVE_GZ_CLEAN=../re_utilities_clean.tar.gz
|
|
35 zcat $ARCHIVE_GZ > $TMP_TAR
|
|
36 ARCHIVE_FILE_LIST=`tar -tz -f ../re_utilities.tar.gz`
|
|
37 ls -l $TMP_TAR
|
|
38 GIT_LIST=`git ls-files`
|
|
39
|
|
40 for FILE in $ARCHIVE_FILE_LIST
|
|
41 do
|
|
42 containsElement $FILE ${GIT_LIST[@]}
|
|
43 if [ $? != 0 ]
|
|
44 then
|
|
45 echo "Deleting ${FILE}"
|
|
46 tar --delete -f $TMP_TAR $FILE
|
|
47 fi
|
|
48 done
|
|
49 ls -l $TMP_TAR
|
|
50 echo "compressing.."
|
|
51 gzip -c $TMP_TAR > $ARCHIVE_GZ_CLEAN
|
|
52 echo "output in ${ARCHIVE_GZ_CLEAN}"
|
|
53
|
|
54 #+END_SRC
|
|
55
|
|
56
|
|
57
|
|
58
|