Update fusion360-update.sh

This commit is contained in:
Steve Zabka
2022-02-16 15:02:26 +01:00
committed by GitHub
parent 17e48b1413
commit 4603da81d9

View File

@@ -7,31 +7,33 @@
# Author URI: https://cryinkfly.com #
# License: MIT #
# Copyright (c) 2020-2022 #
# Time/Date: 17:45/15.02.2022 #
# Version: 0.0.1 #
# Time/Date: 15:00/16.02.2022 #
# Version: 0.0.2 #
####################################################################################################
###############################################################################################################################################################
# ALL LOG-FUNCTIONS ARE ARRANGED HERE: #
###############################################################################################################################################################
# Check if already exists a Autodesk Fusion 360 installation on your system.
function setupact-check-f360 {
f360_path="$HOME/.config/fusion360/logs/wineprefixes-path.log"
if [ -f "$f360_path" ]; then
mkdir -p tmp/logs # Create a tempory folder.
cp "$HOME/.config/fusion360/logs/wineprefixes-path.log" tmp/logs # Copy this file to another place for the next process.
mv tmp/logs/wineprefixes-path.log tmp/logs/wineprefixes-path # Rename this file for the next process.
setupact-update-f360 # Update a exists Wineprefix of Autodesk Fusion 360.
# I will change this value as soon as a new version of Autodesk Fusion 360 is available.
# A value of 0 means that there is no update and a value of 1 will notify the user that there is an update.
get_update=0
# Checks the current day of the week so that the update can be performed.
# %u day of week (1..7); 1 is Monday.
# The update runs on Monday, Wednesday and Friday.
function setupact-check {
pc_date=$(date +%u)
if [ $pc_date -eq 1 ]; then
# echo "Monday"
elif [ $pc_date -eq 3 ]; then
# echo "Wednesday"
elif [ $pc_date -eq 5 ]; then
# echo "Friday"
else
setupact-check-f360-error
# echo "Do nothing!"
fi
}
# Remove Temp folder!
function setupact-del-tmp {
rm -f tmp
}
# Still in Progress!