forked from sweetpad-dev/sweetpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new task executor
- Loading branch information
Showing
14 changed files
with
684 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ | ||
"selector": "import", | ||
"format": ["camelCase", "PascalCase"] | ||
} | ||
], | ||
"rules": { | ||
"@typescript-eslint/naming-convention": [ | ||
"warn", | ||
{ | ||
"selector": "import", | ||
"format": [ "camelCase", "PascalCase" ] | ||
} | ||
], | ||
"@typescript-eslint/semi": "warn", | ||
"curly": "warn", | ||
"eqeqeq": "warn", | ||
"no-throw-literal": "warn", | ||
"semi": "off" | ||
}, | ||
"ignorePatterns": [ | ||
"out", | ||
"dist", | ||
"**/*.d.ts" | ||
] | ||
} | ||
"@typescript-eslint/semi": "warn", | ||
"curly": "warn", | ||
"eqeqeq": "warn", | ||
"no-throw-literal": "warn", | ||
"semi": "off" | ||
}, | ||
"ignorePatterns": ["out", "dist", "**/*.d.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ dist | |
node_modules | ||
.vscode-test/ | ||
*.vsix | ||
|
||
# Temporary files for building setvbuf | ||
.temp/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
|
||
# Path to your source file | ||
SOURCE_FILE="setvbuf/setvbuf.c" | ||
|
||
# Set locations | ||
TEMP_DIR="./.temp" | ||
OUT_DIR="./out" | ||
|
||
# Ensure directories exist | ||
mkdir -p $TEMP_DIR | ||
mkdir -p $OUT_DIR | ||
|
||
# Compile for arm64 architecture | ||
clang -O2 -fpic -shared -arch arm64 -o $TEMP_DIR/setvbuf_arm64.so $SOURCE_FILE | ||
|
||
# Compile for x86_64 architecture | ||
clang -O2 -fpic -shared -arch x86_64 -o $TEMP_DIR/setvbuf_x86_64.so $SOURCE_FILE | ||
|
||
# Create a Universal Binary from the architecture-specific files | ||
lipo -create -output $OUT_DIR/setvbuf_universal.so $TEMP_DIR/setvbuf_arm64.so $TEMP_DIR/setvbuf_x86_64.so | ||
|
||
# Optionally, remove the architecture-specific shared libraries if not needed | ||
rm $TEMP_DIR/setvbuf_arm64.so $TEMP_DIR/setvbuf_x86_64.so | ||
|
||
# Remove the temporary directory if not needed | ||
rm -r $TEMP_DIR | ||
|
||
echo "Universal binary created at out/setvbuf_universal.so" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
/** | ||
* This program sets the buffering mode of stdout to line buffered. | ||
* | ||
* It's a hacky way to make sure that the output of the program is | ||
* line buffered, even if the program is run in a non-interactive | ||
* environment. | ||
*/ | ||
void __attribute__((constructor)) initLibrary(void) { | ||
setvbuf(stdout, NULL, _IOLBF, BUFSIZ); | ||
} |
Oops, something went wrong.