gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/www-cvs-sync.sh 53
1 files changed, 39 insertions, 14 deletions
diff --git a/scripts/www-cvs-sync.sh b/scripts/www-cvs-sync.sh
index 3ee5b94b..d050a517 100644
--- a/scripts/www-cvs-sync.sh
+++ b/scripts/www-cvs-sync.sh
@@ -10,35 +10,60 @@ SRCLST=`find $SRC_DIR -type f -a -not -path '*/.doctree*' -a -not -iname '.build
ADDLST=()
FULLLST=()
for NM in $SRCLST; do
- DNM=`echo $NM | awk '{gsub(/doc\/html/, "www/gsl-shell"); print 0ドル }'`
- echo "Treating: $NM"
+ DNM=${NM/doc\/html/www\/gsl-shell}
RDNM=`echo $DNM | awk '{gsub(/^.*www\/gsl-shell\//, ""); print 0ドル }'`
if test ! -f $DNM; then
ADDLST[${#ADDLST[@]}]=$RDNM
+ FULLLST[${#FULLLST[@]}]=$RDNM
+ else
+ cmp -s "$NM" "$DNM"
+ if test $? -eq 1; then
+ FULLLST[${#FULLLST[@]}]=$RDNM
+ fi
fi
- FULLLST[${#FULLLST[@]}]=$RDNM
done
WWWLST=`find $WWW_DIR -type f -a -not -path '*CVS*'`
RMLST=()
for NM in $WWWLST; do
- SNM=`echo $NM | awk '{gsub(/www\/gsl-shell/, "doc/html"); print 0ドル }'`
- echo "Treating: $NM"
+ SNM=${NM/www\/gsl-shell/doc\/html}
if test ! -f $SNM; then
RMLST[${#RMLST[@]}]=`echo $NM | awk '{gsub(/^.*www\/gsl-shell\//, ""); print 0ドル }'`
fi;
done
-cd www/gsl-shell
+echo "Files to copy: "
for NM in ${FULLLST[@]}; do
- cp "$SRC_DIR/$NM" "$NM"
+ echo $NM
done
-if test ${#ADDLST[@]} -gt 0; then
- cvs add "${ADDLST[@]}"
-fi
-if test ${#RMLST[@]} -gt 0; then
- rm "${RMLST[@]}"
- cvs remove "${RMLST[@]}"
+
+echo "Files to add:"
+for NM in ${ADDLST[@]}; do
+ echo $NM
+done
+
+echo "Files to remove:"
+for NM in ${RMLST[@]}; do
+ echo $NM
+done
+
+echo -n "Commit the changes [Yes/No] ? "
+read ANSWER
+
+if test "${ANSWER:-no}" = "Yes" -o "${ANSWER:-no}" = "yes"; then
+ cd www/gsl-shell
+ for NM in ${FULLLST[@]}; do
+ cp "$SRC_DIR/$NM" "$NM"
+ done
+ if test ${#ADDLST[@]} -gt 0; then
+ cvs add "${ADDLST[@]}"
+ fi
+ if test ${#RMLST[@]} -gt 0; then
+ rm "${RMLST[@]}"
+ cvs remove "${RMLST[@]}"
+ fi
+ cd -
+else
+ echo "Changes not done"
fi
-cd -
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月25日 16:03:30 +0000

AltStyle によって変換されたページ (->オリジナル) /