add fixincludes
This commit is contained in:
parent
f306396c1a
commit
044703c319
|
@ -6,6 +6,7 @@ A Collection of some "useful" scripts
|
||||||
|------|---------|------------|
|
|------|---------|------------|
|
||||||
|```downloadhelper.sh``` | download anc convert Youtube Videos or Soundcloud Songs | Youtube-DL & ffmpeg
|
|```downloadhelper.sh``` | download anc convert Youtube Videos or Soundcloud Songs | Youtube-DL & ffmpeg
|
||||||
|```fixcam.sh``` |remove " (1)" from all files inside a folder| |
|
|```fixcam.sh``` |remove " (1)" from all files inside a folder| |
|
||||||
|
|```fixincludes.sh```| fixes wrong includes. Takes a Folder of c/c++ Code and corrects the includes, that are not case sensitive (local includes only) | sed, awk, bash |
|
||||||
|```kvm.sh``` |start a kvm| kvm |
|
|```kvm.sh``` |start a kvm| kvm |
|
||||||
|```load.sh``` |download a bunch of sequentialy numbered files| wget |
|
|```load.sh``` |download a bunch of sequentialy numbered files| wget |
|
||||||
|```m3u8append.sh``` | takes a m3u8 playlist, removes comments (lines starting with '#') and addes a line in front of every other line. Saves the output to a difrent file. | |
|
|```m3u8append.sh``` | takes a m3u8 playlist, removes comments (lines starting with '#') and addes a line in front of every other line. Saves the output to a difrent file. | |
|
||||||
|
@ -16,4 +17,3 @@ A Collection of some "useful" scripts
|
||||||
|```timelapse.sh```| a script to create timelapses with a webcam | imagemagick, ffmpeg & streamer |
|
|```timelapse.sh```| a script to create timelapses with a webcam | imagemagick, ffmpeg & streamer |
|
||||||
|```setup.sh```| a script that installs all my useful tools, after i reinstalled my Operating System - BE CAREFUL! | fstab |
|
|```setup.sh```| a script that installs all my useful tools, after i reinstalled my Operating System - BE CAREFUL! | fstab |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#small script, that fixes wrong includes (case insensitive to case sensitive) from windows sourcecode
|
||||||
|
#requires: sed, awk, bash
|
||||||
|
|
||||||
|
sedfile="includes.sed"
|
||||||
|
srcf="src/"
|
||||||
|
|
||||||
|
echo "generate sedfile"
|
||||||
|
ls ${srcf}*.h | cut -d "/" -f 2 | awk '{print "s/#include \"" $0 "\"/#include \"" $0 "\"/Ig"}' > "$sedfile"
|
||||||
|
|
||||||
|
#anwenden
|
||||||
|
for f in ${srcf}*; do
|
||||||
|
echo "fix includes for: $f"
|
||||||
|
sed -Ef $sedfile "$f" > "$f.fixed"
|
||||||
|
mv "$f.fixed" "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "delete sedfile"
|
||||||
|
rm $sedfile
|
Loading…
Reference in New Issue