fixing renderText script

This commit is contained in:
2026-06-11 15:14:00 +02:00
parent 3e922883f7
commit 9ad6b15130
302 changed files with 120914 additions and 20 deletions
Executable
+52
View File
@@ -0,0 +1,52 @@
#!/bin/sh
# CProcessing sketchpad creator
###############################
# Takes name as input
# Creates new folder with name
# Creates main.cpp and Makefile in folder
#########################################
if [ $# -eq 0 ]
then
echo "You must give a name to sketch"
echo "e.g.: \"./new.sh myfirstsketch\""
exit 1
fi
#arg was given
#TODO:check for "bad" characters
if [ -d $1 ]; then
echo "Sketch Already Exists" 1>&2
exit 1
fi
mkdir $1
if [ $? -eq 1 ]; then
echo "Need to change permissions to create folder" 1>&2
exit 1
fi
cp ../helpers/sketchmain.cpp $1/main.cpp
cp ../helpers/sketchdebug.sh $1/debug.sh
cp ../helpers/tags $1/tags
unamestr=`uname`
if [ "$unamestr" = "Linux" ]; then
cp ../helpers/SketchMakefile.lin $1/Makefile
elif [ "$unamestr" = "Darwin" ]; then
cp ../helpers/SketchMakefile.dar $1/Makefile
else
cp ../helpers/SketchMakefile.win $1/Makefile
fi
cd $1
#make
echo "Sketch $1 created!"
ls