-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathupdate_linux_bins.sh
executable file
·103 lines (92 loc) · 2.21 KB
/
update_linux_bins.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/env bash
env_name="ambertools"
source="$HOME/mambaforge/envs/${env_name}"
destination="acpype/amber_linux"
if mamba env list | grep -q " $env_name "; then
if [[ "$1" == "-f" ]]; then
mamba env remove --name "$env_name" --yes
mamba create -n "$env_name" ambertools --yes
else
echo "The '$env_name' environment already exists. Use '-f' to force re-run."
exit 1
fi
fi
files=(
bin/bondtype
bin/tleap
bin/atomtype
bin/wrapped_progs/bondtype
bin/wrapped_progs/atomtype
bin/wrapped_progs/antechamber
bin/wrapped_progs/parmchk2
bin/wrapped_progs/am1bcc
bin/antechamber
bin/parmchk2
bin/sqm
bin/am1bcc
bin/teLeap
LICENSE
GNU_LGPL_v3
amber.sh
dat/antechamber
dat/chamber
dat/leap
lib/libcifparse.so
lib/libsff_fortran.so
lib/libnetcdf.so.19
lib/libmfhdf.so.0
lib/libmfhdf.so.0.0.0
lib/libdf.so.0
lib/libdf.so.0.0.0
lib/libhdf5_hl.so.310
lib/libhdf5_hl.so.310.0.2
lib/libhdf5.so.310
lib/libhdf5.so.310.2.0
lib/libcrypto.so.3
lib/libzip.so.5
lib/libzip.so.5.5
lib/libsz.so.2
lib/libsz.so.2.0.1
)
exclude=(
--exclude=__pycache__
--exclude=*.pyc
--exclude=*.pyo
--exclude=*.log
--exclude=pixmaps/
)
rm -fr $destination
for item in "${files[@]}"; do
source_path="${source}/${item}"
destination_path="${destination}/${item}"
pdir=$(dirname "$destination_path")
mkdir -p "$pdir"
if [ -d "$source_path" ]; then
rsync -av "${exclude[@]}" "$source_path" "$pdir"
else
rsync -av "${exclude[@]}" "$source_path" "$destination_path"
fi
done
tar xvfz charmmgen.tgz
pre-commit run -a
tree -d $destination
find $destination | wc -l # 569 files, 15 dirs
# acpype/amber_linux
# ├── bin
# │ └── wrapped_progs
# ├── dat
# │ ├── antechamber
# │ ├── chamber
# │ └── leap
# │ ├── cmd
# │ │ └── oldff
# │ ├── lib
# │ │ └── oldff
# │ ├── parm
# │ └── prep
# │ ├── oldff
# │ └── protonated_nucleic
# └── lib
# amber.sh
# GNU_LGPL_v3
# LICENSE