#!/bin/bash# Create the bdncsv directory if it doesn't exist
mkdir-pbdncsv
# Find and move all .csv files into the bdncsv directory
find.-maxdepth1-typef-iname"*.csv"-execmv{}bdncsv/\;
#!/bin/bash# Create the bdnimages directory if it doesn't exist
mkdir-pbdnimages
# Find and move all .jpg, .jpeg, and .png files into the bdnimages directory
find.-maxdepth1-typef\(-iname"*.jpg"-o-iname"*.jpeg"-o-iname"*.png"\)-execmv{}bdnimages/\;
#!/bin/bash# Create the bdnpdfs directory if it doesn't exist
mkdir-pbdnpdfs
# Find and move all .pdf files into the bdnpdfs directory
find.-maxdepth1-typef-iname"*.pdf"-execmv{}bdnpdfs/\;
#!/bin/bash# Create the bdnpy directory if it doesn't exist
mkdir-pbdnpy
# Find and move all .py files into the bdnpy directory
find.-maxdepth1-typef-iname"*.py"-execmv{}bdnpy/\;
#!/bin/bash# Create the bdnsh directory if it doesn't exist
mkdir-pbdnsh
# Find and move all .sh files into the bdnsh directory
find.-maxdepth1-typef-iname"*.sh"-execmv{}bdnsh/\;
#!/bin/bash# Function to reset to a clean state.
reset_state(){# Abort any ongoing rebase.gitrebase--abort&>/dev/null&&echo"Aborted an ongoing rebase."# Stash any unstaged changes to ensure operations can proceed.gitstashsave"Unstaged changes before running githis.sh"&&echo"Stashed unsaved changes."# Remove any lingering rebase directories.if[-d".git/rebase-merge"]||[-d".git/rebase-apply"];thenrm-rf.git/rebase-*
echo"Removed lingering rebase directories."fi}# Navigate to the main working directory.cd~/dropbox/1f.ἡἔρις,κ/1.ontology
# Navigate to the six100 directory.cdsix100||{echo"Directory six100 does not exist. Exiting.";exit1;}# Reset to a clean state.
reset_state
# Fetch the latest changes from temp_og_repo using SSH.ifgitfetchgit@github.com:afecdvi/temp_og_repo.gitmain;thenecho"Successfully fetched changes via SSH."elseecho"Failed to fetch changes using SSH. Exiting."exit1fi# Reset the local branch to match the fetched changes.
gitreset--hardFETCH_HEAD
echo"Local branch reset to match fetched changes."# Check for network connection.if!ping-c1google.com&>/dev/null;thenecho"No internet connection. Exiting."exit1fi# Check repository size.REPO_SIZE=$(du-sh.git|cut-f1)echo"Repository size: $REPO_SIZE"# Adjust Git configurations.POST_BUFFER_SIZE=$(((RANDOM%200+300)*1048576))LOW_SPEED_LIMIT=$((RANDOM%5000+2000))LOW_SPEED_TIME=$((RANDOM%60+30))
gitconfighttp.postBuffer$POST_BUFFER_SIZE
gitconfighttp.lowSpeedLimit$LOW_SPEED_LIMIT
gitconfighttp.lowSpeedTime$LOW_SPEED_TIMEecho"Adjusted Git's buffer size to $POST_BUFFER_SIZE, low speed limit to $LOW_SPEED_LIMIT and low speed time to $LOW_SPEED_TIME."# Push the changes to the remote repository using SSH and verbose logging.ifgitpushgit@github.com:afecdvi/og.gitmain--force-v;thenecho"Successfully pushed changes using SSH."# Unstash any changes we stashed earlier.gitstashpop&>/dev/null&&echo"Restored previously stashed changes."echo"Script completed successfully!"elseecho"Failed to push changes even with SSH. Exiting."gitstashpop&>/dev/null&&echo"Restored previously stashed changes."exit1fi