-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload.sh
More file actions
executable file
·31 lines (25 loc) · 814 Bytes
/
upload.sh
File metadata and controls
executable file
·31 lines (25 loc) · 814 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
#!/bin/bash
echo "Source env file for all variables"
source ./env
echo "Replacing styles from website header and title"
cd $DIR/themes/coder/assets/scss && sed -i 's/uppercase/none/' _navigation.scss && cd $DIR
cd $DIR/themes/coder/layouts/_default && sed -i 's/·/-/' single.html && cd $DIR
echo "Deleting old publication"
rm -rf public
mkdir public
echo "Generating site"
hugo
echo "Restore changes in theme"
cd $DIR/themes/coder && git restore . && cd $DIR
echo "<< Syncing from Local $DIR --> Remote $REMOTEFOLDER >>
-----------------------------"
lftp -e "
set sftp:auto-confirm yes
set ssl:verify-certificate no
open $FTPHOST
user $USR $PASS
lcd $LOCALFOLDER
mirror --reverse --verbose --transfer-all --only-newer $DIR/public/ $REMOTEFOLDER/
bye
"
echo "Sync Complete."