-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpack_stable.sh
More file actions
40 lines (30 loc) · 819 Bytes
/
pack_stable.sh
File metadata and controls
40 lines (30 loc) · 819 Bytes
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
#!/bin/bash
set -e
# Author: He Zhenliang
# Date: 2023
mkdir ./stable
# vimrc
rm -rf ./stable/.vim_runtime
cp -r $HOME/.vim_runtime ./stable/.vim_runtime
# fzf
rm -rf ./stable/.fzf
cp -r $HOME/.fzf ./stable/.fzf
cp $TOOL_HOME/bin/fzf ./stable/fzf
# lesspipe
cp $TOOL_HOME/bin/lesspipe.sh ./stable/lesspipe.sh
# oh-my-zsh
rm -rf ./stable/.oh-my-zsh
cp -r $HOME/.oh-my-zsh ./stable/.oh-my-zsh
# pack
tar cvzf stable.tar.gz stable
rm -rf ./stable
# make tools_stable.yml
echo 'name: tools
channels:
- conda-forge
dependencies:' > tools_stable.yml
packages=($(grep 'dependencies' tools.yml -A 10000 | grep -E '^[ ]*-' | sed 's/[ ]*\-[ ]*\([^ =#]*\).*/\1/g'))
versions=$(conda env export -n tools --no-builds)
for package in "${packages[@]}"; do
echo "$versions" | grep "\- $package="
done >> tools_stable.yml