From f0b5ab5ef08ff075ac4128e1a5cc97a54536af59 Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Thu, 20 May 2021 14:17:14 +0200 Subject: [PATCH] Create a scripts folder --- .github/workflows/build_and_test.yml | 4 +-- .../build_all_fuzzers.sh | 4 ++- clippy.sh => scripts/clippy.sh | 5 +++- scripts/publish.sh | 25 +++++++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) rename build_all_fuzzers.sh => scripts/build_all_fuzzers.sh (73%) rename clippy.sh => scripts/clippy.sh (88%) create mode 100755 scripts/publish.sh diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index cce77bff2d..b8b807e494 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -59,9 +59,9 @@ jobs: - name: Test Docs run: cargo test --all-features --doc - name: Run clippy - run: ./clippy.sh + run: ./scripts/clippy.sh - name: Build fuzzers - run: ./build_all_fuzzers.sh + run: ./scripts/build_all_fuzzers.sh windows: runs-on: windows-latest steps: diff --git a/build_all_fuzzers.sh b/scripts/build_all_fuzzers.sh similarity index 73% rename from build_all_fuzzers.sh rename to scripts/build_all_fuzzers.sh index 6ccf0cccde..b070178f53 100755 --- a/build_all_fuzzers.sh +++ b/scripts/build_all_fuzzers.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd "$SCRIPT_DIR/.." # TODO: This should be rewritten in rust, a Makefile, or some platform-independent language diff --git a/clippy.sh b/scripts/clippy.sh similarity index 88% rename from clippy.sh rename to scripts/clippy.sh index cb70773ae9..a05d50313f 100755 --- a/clippy.sh +++ b/scripts/clippy.sh @@ -1,4 +1,7 @@ -#!/bin/sh +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd "$SCRIPT_DIR/.." + # Clippy checks if [ "$1" != "--no-clean" ]; then # Usually, we want to clean, since clippy won't work otherwise. diff --git a/scripts/publish.sh b/scripts/publish.sh new file mode 100755 index 0000000000..6ef386df2b --- /dev/null +++ b/scripts/publish.sh @@ -0,0 +1,25 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd "$SCRIPT_DIR/.." + +set -e + +cd libafl_derive +cargo publish $@ +cd .. + +cd libafl_cc +cargo publish $@ +cd .. + +cd libafl +cargo publish $@ +cd .. + +cd libafl_targets +cargo publish $@ +cd .. + +cd libafl_frida +cargo publish $@ +cd ..