|
@@ -68,6 +68,25 @@ function ipfs_publish {
|
68
|
68
|
|
69
|
69
|
NEW_STAT=$(stat -t $DIR_TO_CHECK)
|
70
|
70
|
|
|
71
|
+ # include some subdirectories
|
|
72
|
+ for dir in $DIR_TO_CHECK/*/
|
|
73
|
+ do
|
|
74
|
+ REALLY_NEW_STAT="$NEW_STAT$(stat -t $dir)"
|
|
75
|
+ NEW_STAT="$REALLY_NEW_STAT"
|
|
76
|
+
|
|
77
|
+ for dir2 in "$dir"/*/
|
|
78
|
+ do
|
|
79
|
+ REALLY_NEW_STAT="$NEW_STAT$(stat -t $dir2)"
|
|
80
|
+ NEW_STAT="$REALLY_NEW_STAT"
|
|
81
|
+
|
|
82
|
+ for dir3 in "$dir2"/*/
|
|
83
|
+ do
|
|
84
|
+ REALLY_NEW_STAT="$NEW_STAT$(stat -t $dir3)"
|
|
85
|
+ NEW_STAT="$REALLY_NEW_STAT"
|
|
86
|
+ done
|
|
87
|
+ done
|
|
88
|
+ done
|
|
89
|
+
|
71
|
90
|
if [ "$OLD_STAT" != "$NEW_STAT" ]; then
|
72
|
91
|
su -c "echo \$($IPFS_COMMAND add -rq /home/$MY_USERNAME/Public | tail -n 1) > $IPFS_PUBLIC" - $MY_USERNAME
|
73
|
92
|
echo "$NEW_STAT" > $OLD_STAT_FILE
|