-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpub4trigger.sh
executable file
·58 lines (44 loc) · 1.56 KB
/
pub4trigger.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
#!/bin/bash
#
### changelog::
# 200306:ZQ re-define for rMBP local Pyenv
# 191213:ZQ re-define for YAtrigger restartr self
# 191204:ZQ re-define for Yaz
#1 0 * * * /opt/srv/yaz_studio/yeti/yazi/cmd/inv4pub.sh >> /opt/log/cron/_hook4yaz.log 2>&1
# 191031:ZQ refactory as inv4pub.sh
# 170818:ZQ refactory for N3160 miniPC Aoi
# 150803:ZQ re-pub with github
# 141022:ZQ creat base hook-deploy-by-git.sh
#=========================================================== var defines
VER="pub4trigger v.200306.2142"
#DATE=`date "+%y%m%d"`
#NOW=$(date +"%Y-%m-%d")
PBIN=~/.pyenv/versions/ztop380/bin
SELF=~/Sites/PyChina.org/weekly
GIT=$( which git)
PY=$PBIN/python
PIP=$PBIN/pip
ACTI=$PBIN/activate
#=========================================================== path defines
NOW=`date +"%y%m%d_%H%M%S"`
YEAR=`date +"%Y"`
MONTH=`date +"%m"`
#AIMP=/opt/log/cron
#LOGF=$AIMP/$YEAR-$MONTH-YAtrigger.log
#TARGET=/opt/log/yazi/_upd_trigger.log
#=========================================================== action defines
source $ACTI
$PIP list | grep pelican
python -V
cd $SELF
git pl
#fab ?
#fab pub
inv -l
inv pub
#=========================================================== action DONE
exit 0
# SEE:
# Is there a preferred way to use pyenv in a shell script? · Issue #492 · pyenv/pyenv https://github.com/pyenv/pyenv/issues/492
# cron定时运行python virtualenv中的python程序 - SegmentFault 思否 https://segmentfault.com/q/1010000000319231
# How to set virtualenv for a crontab? | RubyPDF Blog http://blog.rubypdf.com/2018/10/12/how-to-set-virtualenv-for-a-crontab/