mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Remove console spam
This commit is contained in:
parent
50d4b045e7
commit
91a601fb5f
@ -4,10 +4,10 @@
|
|||||||
read -p "Enter the directory path to set permissions (/var/opt/minecraft/crafty): " directory_path
|
read -p "Enter the directory path to set permissions (/var/opt/minecraft/crafty): " directory_path
|
||||||
|
|
||||||
# Count the total number of directories
|
# Count the total number of directories
|
||||||
total_dirs=$(find "$directory_path" -type d | wc -l)
|
total_dirs=$(find "$directory_path" -type d 2>/dev/null | wc -l)
|
||||||
|
|
||||||
# Count the total number of files
|
# Count the total number of files
|
||||||
total_files=$(find "$directory_path" -type f | wc -l)
|
total_files=$(find "$directory_path" -type f 2>/dev/null | wc -l)
|
||||||
|
|
||||||
# Initialize a counter for directories and files
|
# Initialize a counter for directories and files
|
||||||
dir_count=0
|
dir_count=0
|
||||||
@ -27,17 +27,19 @@ else
|
|||||||
|
|
||||||
# Run the commands to set permissions for directories
|
# Run the commands to set permissions for directories
|
||||||
echo "Changing permissions for directories:"
|
echo "Changing permissions for directories:"
|
||||||
for dir in $(find "$directory_path" -type d); do
|
for dir in $(find "$directory_path" -type d 2>/dev/null); do
|
||||||
sudo chmod 700 "$dir"
|
if [ -e "$dir" ]; then
|
||||||
((dir_count++))
|
sudo chmod 700 "$dir" && ((dir_count++))
|
||||||
|
fi
|
||||||
print_progress
|
print_progress
|
||||||
done
|
done
|
||||||
|
|
||||||
# Run the commands to set permissions for files
|
# Run the commands to set permissions for files
|
||||||
echo -e "\nChanging permissions for files:"
|
echo -e "\nChanging permissions for files:"
|
||||||
for file in $(find "$directory_path" -type f); do
|
for file in $(find "$directory_path" -type f 2>/dev/null); do
|
||||||
sudo chmod 644 "$file"
|
if [ -e "$file" ]; then
|
||||||
((file_count++))
|
sudo chmod 644 "$file" && ((file_count++))
|
||||||
|
fi
|
||||||
print_progress
|
print_progress
|
||||||
done
|
done
|
||||||
echo "You will now need to execute a chmod +x on all bedrock executables"
|
echo "You will now need to execute a chmod +x on all bedrock executables"
|
||||||
|
Loading…
Reference in New Issue
Block a user