-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc.sh
41 lines (35 loc) · 1.38 KB
/
c.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
37
38
39
40
41
# **************************************************************************** #
# #
# ::: :::::::: #
# c.sh :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tmoret <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2021/12/01 19:09:46 by tmoret #+# #+# #
# Updated: 2022/01/03 17:49:42 by Maurice809 ### Lausanne.ch #
# #
# **************************************************************************** #
#
# Faire des applications pour Mobile, C'est l'avenir !
#
# Mobile
# พิมรภัส ผดุงวัฒนะโชค
# PIMRAPAT PHADUNGWATANACHOK
#!/bin/bash
machine=$(uname)
cp main.c ../ft_printf
var_a=$(printf "%q" $1)
if [ -n "$1" ]; then
if [ "$machine" == "Linux" ]; then
sed -i "s/48/${var_a}/g" ../ft_printf/main.c
else
sed -i "" "s/48/${var_a}/g" ../ft_printf/main.c
fi
fi
cd ../ft_printf
make re
cc -Wall -Wextra -Werror -I. main.c libftprintf.a
./a.out
rm ./a.out
rm ./main.c
make fclean