A few improvements. Script should self update, mods are copied to the mod folder. Renaming folders removed.
parent
99962f958a
commit
1c8a34f742
|
@ -2,6 +2,9 @@
|
|||
|
||||
#This script should pull a list of the directories in the parent folder, cd into each folder issue the Git Update command, update the files, move back to the parent directory and repeat until all files have been updated, then copy the files to the main mod directory.
|
||||
|
||||
#Move to the parent directory so the script can self update.
|
||||
cd ..
|
||||
|
||||
#Define MODS as a listing of all the subdirectories
|
||||
MODS=`ls`
|
||||
|
||||
|
@ -9,16 +12,15 @@ for i in ${MODS}; do
|
|||
echo "$i" #Prints the current directory, useful for debugging and logs, pointless right now.
|
||||
cd $i #Moves into the current directory, VERY IMPORTANT
|
||||
git pull #Runs the update call for GIT
|
||||
cd -; #Moves back up to the parent directory
|
||||
cd ..; #Moves back up to the parent directory
|
||||
done #Once all directories have cycled through this ends the loop
|
||||
|
||||
#Now that all files are updated copy them to the main directory.
|
||||
rsync -r '' ~/.minetest/mods
|
||||
|
||||
#rsync GIT_LOCATION MINETEST_MOD_LOCATION
|
||||
|
||||
#Move to the minetest/mods folder Please fill this out for your computer, currently is the default
|
||||
#Move to the minetest/mods folder this should be default on all installs.
|
||||
cd ~/.minetest/mods
|
||||
|
||||
#Rename the folders that need it. This must be filled out manually. Basically removes the folder with the right name, and then renames the folder with the wrong name to the right name
|
||||
rm -rf Correct_Folder_Name
|
||||
mv Git_Folder_Name Correct_Folder_Name
|
||||
#rm -rf Correct_Folder_Name
|
||||
#mv Git_Folder_Name Correct_Folder_Name
|
||||
|
|
Loading…
Reference in New Issue