From 1fa63f696772cdb3399800114c2590b1df5fe903 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Sat, 13 May 2023 13:59:58 -0700 Subject: [PATCH] remove comments, add hard link function --- func/common/.imports.sh.swp | Bin 16384 -> 0 bytes sync/common | 6 +++++ sync/common_9 | 2 +- sync/sync-to-prod.delete.sh | 25 +------------------ sync/sync-to-prod.sh | 44 +-------------------------------- sync/sync-to-staging.delete.sh | 16 ++---------- sync/sync-to-staging.sh | 18 ++------------ 7 files changed, 13 insertions(+), 98 deletions(-) delete mode 100644 func/common/.imports.sh.swp diff --git a/func/common/.imports.sh.swp b/func/common/.imports.sh.swp deleted file mode 100644 index d2de4b47a18d3e27d1a0fbda80ea7a674a68a24b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3du$v>9mlut2eecmLI2<}J)dK{@!i>Jsho$CT%1dqlBAKHHk3Tf`gZPa>%HB} zK5So;v=Kr@& zCA-=3{4gj6jqdu{Uzq}#05VtNn#QuanF5&tnF5&tnF5&t znF5&tnF5&t|7Qw>t#ge#=<~TrzYiy$=Pdd>FZugu^64+Sp8T18WC~;oWC~;oWC~;o zWC~;oWC~;oWC~;oWC~;o{0}N%T88ls`t_1J@bmt^bN+wv4TkX@xC=f6YvD?`0A9Y_ zF#Zhp!YAPq@Gf}iGQ)TjPQYQ<2iLdc=hEXY8sJ)ppg9{-BsL1G{QEPFt8_)@%!}CK{$|IksCDL40o@C=e#!^bk{0 zm77zJ6rpDrJz^W*;RtQd4Mf;5!}vd@PxBPnmh`11`kMoGP&Ina@Q+~}GlcM4O;I>3 za{2!Fx0)!)uv+4|bf@4;N1A~g$caMXa3uY9&GVadv#4p z#w$B3<%!BETN;l?m1=CV+K|=h%A6fegk~58BEJc3N>SjKrfj!lxithZgCJ_kwhZ{) zl2cLLku%Z}`6F9*Z`)ega?|!>qUl)?Q|rq>h74tMj#hd^(2$O!pCBwdP?JA8F}7xC z=X)6%@f$d_wZ7&j4)9s^|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9yDs@9Au30#IbX}Z}p}R^KWxTqs5t`sBV_Wl`Ni$_n{7GPBB&DPI{-#RtDT^CW zg813UY5=TVr z?|~QjRcQ_C$SSpW6Ss!#Rwn`Ls8b1v*csC%6yTJi!Y^H>`jHGs?dl6H=*OLfz(nO% zn=`2}ieG&%+(rPbBC7d=U{W^9i7pAajurD{@zhO1rSp)pUww+zVpt3eP#hn?I6%p3Knw6)ee&P)0+U5`&aMQ2{q zW20ep5Eq5p7<5OVg~N7S!W`@9QtS9%t49T;bex;0@R(G8<|jkl(a>jhcbExcF^ayR zq()u5x>TyK4@&zF4HecNH zC6VOs>#;}2#`P*sTwYjhmH3~(O{d`nVTpPhyFKBGvvRChN0OXWo-E!VLO+W0a;agb zqo##1$2G5^W-@5)Pl7fbZ&pLzaIN8Ol2%~31Yi6vi~pBBPCYKF9}BUfCOX4Vo#6$X z@>&c12za%yvYsTK1REL^IUOdS+;hb5XX98=>(N8zmCO$rpO(k8g*HCOH`VK2&y6#K HB fullfilelist - #if [[ -f /usr/local/bin/create-filelist ]]; then - # # We're already here, but Justin Case wanted this - # cd "${PRODUCTION_ROOT}/" || { echo "Failed to change directory"; exit 1; } - # /bin/cp fullfiletimelist-rocky fullfiletimelist-rocky-old - # /usr/local/bin/create-filelist > fullfiletimelist-rocky - # cp fullfiletimelist-rocky fullfiletimelist - #fi - ## Full file list update for rocky linux itself - cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}/" || { echo "Failed to change directory"; exit 1; } - ## Hardlink everything except xml files - echo "Hard linking" - hardlink -x '.*\.xml.*' "${REVISION}" - #find . > fullfilelist - #if [[ -f /usr/local/bin/create-filelist ]]; then - # # We're already here, but Justin Case wanted this - # cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}/" || { echo "Failed to change directory"; exit 1; } - # /bin/cp fullfiletimelist-rocky fullfiletimelist-rocky-old - # /usr/local/bin/create-filelist > fullfiletimelist-rocky - # cp fullfiletimelist-rocky fullfiletimelist - #fi - #chown 10004:10005 fullfilelist fullfiletimelist-rocky fullfiletimelist + rsync_no_delete_prod "${REV}" "${TARGET}" echo "Syncing to prod completed. Please run the file list script." fi diff --git a/sync/sync-to-staging.delete.sh b/sync/sync-to-staging.delete.sh index 902c91a..857317c 100644 --- a/sync/sync-to-staging.delete.sh +++ b/sync/sync-to-staging.delete.sh @@ -22,19 +22,7 @@ ret_val=$? if [ $ret_val -eq "0" ]; then TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" mkdir -p "${TARGET}" - # disabling because none of our files should be starting with dashes. If they - # are something is *seriously* wrong here. - #sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable --delete \ - # {} "${TARGET}" - - # This is temporary until we implement rsync into empanadas - #if [ -f "COMPOSE_ID" ]; then - # cp COMPOSE_ID "${TARGET}" - # chown 10004:10005 "${TARGET}/COMPOSE_ID" - #fi - - #if [ -d "metadata" ]; then - # rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}" - #fi + echo "Hardlinking compose directory before syncing" + perform_hardlink "compose" rsync_delete_staging "${TARGET}" fi diff --git a/sync/sync-to-staging.sh b/sync/sync-to-staging.sh index 2775835..8ecadc5 100644 --- a/sync/sync-to-staging.sh +++ b/sync/sync-to-staging.sh @@ -23,20 +23,6 @@ if [ $ret_val -eq "0" ]; then TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" mkdir -p "${TARGET}" rsync_no_delete_staging "${TARGET}" - # disabling because none of our files should be starting with dashes. If they - # are something is *seriously* wrong here. - #sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \ - # {} "${TARGET}" - - # This is temporary until we implement rsync into empanadas - #if [[ "${COMPOSE}" == "Rocky" ]]; then - # if [ -f "COMPOSE_ID" ]; then - # cp COMPOSE_ID "${TARGET}" - # chown 10004:10005 "${TARGET}/COMPOSE_ID" - # fi - -# if [ -d "metadata" ]; then -# rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}" -# fi -# fi + echo "Hardlinking staging directory" + perform_hardlink "${TARGET}" fi