-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenfile.sh
executable file
·36 lines (29 loc) · 1.37 KB
/
genfile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# **************************************************************************** #
# #
# ::: :::::::: #
# genfile.sh :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vtestut <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/02/25 04:18:27 by vtestut #+# #+# #
# Updated: 2024/02/28 19:43:40 by vtestut ### ########.fr #
# #
# **************************************************************************** #
#!/bin/bash
MY_LOGIN="vtestut"
SOURCES_PATH="/sgoinfre/goinfre/Perso/$MY_LOGIN"
MAKEFILE_PATH="$SOURCES_PATH/cpp_FileGenerator"
make -C "$MAKEFILE_PATH" -f "$MAKEFILE_PATH/Makefile"
echo ""
cd "$MAKEFILE_PATH"
if [ -z "$2" ]; then
./a.out "$1"
else
./a.out "$1" "$2"
fi
mv "$SOURCES_PATH/cpp_FileGenerator/output"/* "$OLDPWD/"
if [ $? -eq 0 ]; then
echo "\nFile(s) successfully added to your current directory"
else
echo "\nif nothing work, check genfile.sh to verifiy paths to sources"
fi