diff --git a/.build/font-linux.md b/.build/font-linux.md index 6c31ab82..941fc6d3 100644 --- a/.build/font-linux.md +++ b/.build/font-linux.md @@ -9,4 +9,5 @@ curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Medium.ttf -O -J curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Regular.ttf -O -J -L && \ curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Retina.ttf -O -J -L && \ curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-SemiBold.ttf -O -J -L && \ -echo "Done downloading fonts" +curl https://github.com/synle/bashrc/raw/master/fonts/Trace.ttf -O -J -L && \ +echo "Done downloading fonts" \ No newline at end of file diff --git a/.build/font-windows.md b/.build/font-windows.md index d6faab26..97cb5a0d 100644 --- a/.build/font-windows.md +++ b/.build/font-windows.md @@ -1,3 +1,5 @@ +C: +cd C: Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaCode.ttf Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaCodePL.ttf Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaMono.ttf @@ -8,4 +10,5 @@ Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/Fira Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Regular.ttf Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Retina.ttf Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-SemiBold.ttf -echo "Done downloading fonts" +Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/Trace.ttf +echo "Done downloading fonts" \ No newline at end of file diff --git a/fonts/README.md b/fonts/README.md index 722b830a..a540a28c 100644 --- a/fonts/README.md +++ b/fonts/README.md @@ -1,41 +1,9 @@ -These fonts are copied from the owner of Fira Code. Repo is at https://github.com/tonsky/FiraCode +These fonts are copied from the owner of Fira Code. Repo is at https://github.com/tonsky/FiraCode and https://www.fontspace.com/trace-font-f3625 -### Bash +### Linux - Bash -```bash -cd ~/Desktop -curl https://github.com/synle/bashrc/raw/master/fonts/CascadiaCode.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/CascadiaCodePL.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/CascadiaMono.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/CascadiaMonoPL.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Bold.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Light.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Medium.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Regular.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Retina.ttf -O -J -L && \ -curl https://github.com/synle/bashrc/raw/master/fonts/FiraCode-SemiBold.ttf -O -J -L && \ -echo "Done downloading fonts" -``` +https://raw.githubusercontent.com/synle/bashrc/master/.build/font-linux.md -### Powershell +### Windows - Powershell -``` -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaCode.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaCodePL.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaMono.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/CascadiaMonoPL.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Bold.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Light.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Medium.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Regular.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-Retina.ttf -Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/FiraCode-SemiBold.ttf -echo "Done downloading fonts" -``` - -Source: - -``` -Trace.ttf -https://www.fontspace.com/trace-font-f3625 -``` +https://raw.githubusercontent.com/synle/bashrc/master/.build/font-windows.md diff --git a/software/scripts/fonts.js b/software/scripts/fonts.js index 99c19f2f..9e34492b 100644 --- a/software/scripts/fonts.js +++ b/software/scripts/fonts.js @@ -18,6 +18,32 @@ async function doWork() { return process.exit(); } + // write to build file + const fontBaseNames = fonts.map((font) => path.basename(font)); + writeToBuildFile([ + [ + 'font-linux.md', + ` +cd ~/Desktop +${fontBaseNames.map((fontBaseName) => `curl https://github.com/synle/bashrc/raw/master/fonts/${fontBaseName} -O -J -L && \\`).join('\n')} +echo "Done downloading fonts" +`.trim(), + false, + ], + [ + 'font-windows.md', + ` +C: +cd C: +${fontBaseNames + .map((fontBaseName) => `Start-BitsTransfer -Source https://github.com/synle/bashrc/raw/master/fonts/${fontBaseName}`) + .join('\n')} +echo "Done downloading fonts" +`.trim(), + false, + ], + ]); + const promises = []; for (const font of fonts) { promises.push(